This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: add-symbol-file-from-memory patch breaks non-elf targets?
- From: Jim Blandy <jimb at redhat dot com>
- To: Roland McGrath <roland at redhat dot com>
- Cc: Randolph Chung <randolph at tausq dot org>, gdb at sources dot redhat dot com
- Date: 22 Apr 2004 23:31:04 -0500
- Subject: Re: add-symbol-file-from-memory patch breaks non-elf targets?
- References: <200404230418.i3N4Iuu3005779@magilla.sf.frob.com>
Roland McGrath <roland@redhat.com> writes:
> It's unfortunate that this is done in a way that requires a tweak for every
> specific target. The functionality will work, and thus ought to be
> available, on any ELF target. The use of symbol_file_add_from_memory from
> other gdb code to support Linux's vDSO is already needed on more than one
> Linux target and it is not unlikely that other Linux targets will follow
> suit in the future. It is crufty and makes maintenance error prone if we
> have nothing better than copying and updating makefile boilerplate for
> every specific Linux/CPU target. For example, your patch covers only x86
> and powerpc, but already IA64 and x86-64 need this support (and AFAIK not
> yet powerpc).
But "any ELF target" is not a well-defined thing in GDB. GDB just
tries to cope with whatever it gets. GDB lets BFD keep track of what
object file formats are appropriate for what targets.
The reason I thought this approach would be appropriate is that it
resembles the way we handle the different dynamic linker debugging
protocols: each .mt file selects solib-mumble.o manually. As far as I
know, this hasn't been much of a maintenance hassle.