Re: PATCH: gdb/corefile.c (0401 snap on HP-UX).

J.T. Conklin
2001-04-10T17:46:00Z

>>>>> "Kevin" == Kevin Buettner <kevinb@cygnus.com> writes:
Kevin> The reason that symfile_objfile is undefined for HP is because of the
Kevin> following code in core_file_command():

Kevin> [...]

Kevin> The code controlled by the above ifdef looks pretty generic and
Kevin> it seems to me that it could be useful on targets other than
Kevin> HP. I suggest that we do one of two things:
Kevin>
Kevin> 1) Enable it for all targets and add Rodney's #include statments
Kevin> unconditionally.
Kevin>
Kevin> 2) Remove it entirely.
Kevin>
Kevin> I'm not familiar enough with the code in question to know what
Kevin> the best course of action is.

Yes, on second look the code is host/target independent. I can't
understand why it is wrapped in HPPAHPUX. Perhaps it was part of the
infamous HP "merge".

The comment before core_file_command() states that the "core-file"
command exists for backwards compatibility; but the command is not
marked deprecated in the CLI. If I knew the command was deprecated,
I wouldn't hesitate suggesting the code be removed.

It is interesting to note that "target core XXX" does look at the name
of the symbol file, but only to print the name, not to set the symbol
file. This might be a more appropriate behavior for the "core-file"
command.

Also note that that section of code is the only bit in GDB that uses
the .to_core_file_to_sym_file() vector function. If it is removed,
we'll be able to remove quite a bit of code as well.