From mboxrd@z Thu Jan 1 00:00:00 1970 From: jtc@redback.com (J.T. Conklin) To: Kevin Buettner Cc: RDBrown@mira.net, RodneyBrown@mynd.com, gdb-patches@sources.redhat.com Subject: Re: PATCH: gdb/corefile.c (0401 snap on HP-UX). Date: Tue, 10 Apr 2001 17:46:00 -0000 Message-id: <5m1yr09scb.fsf@jtc.redback.com> References: <1010409171714.ZM10166@ocotillo.lan> X-SW-Source: 2001-04/msg00106.html >>>>> "Kevin" == Kevin Buettner 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. --jtc -- J.T. Conklin RedBack Networks