This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC]: New dwarf2 reader
- To: Daniel Berlin <dan at cgsoftware dot com>
- Subject: Re: [RFC]: New dwarf2 reader
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Fri, 29 Jun 2001 02:35:08 -0400
- Cc: gdb-patches at sources dot redhat dot com
- References: <87pubnluqa.fsf@cgsoftware.com>
Dan,
For such a radical change to fly, I think this should be a runtime
replacement for the existing dwarf2 reader.
That way people can test the two side by side. It will give people
greater confidence and an easy reference point.
Some trivia:
> #ifndef DWARF2_REG_TO_REGNUM
> #define DWARF2_REG_TO_REGNUM(REG) (REG)
> #endif
this shouldn't be needed. If it is then there is a bug in multi-arch.
> #if defined(HAVE_MMAP) && defined(HAVE_GETPAGESIZE)
> #include <sys/mman.h>
> #endif
It should be posible to structure things so those #if #else #endif's are
largely eliminated. You want as much of your code to be exposed to the
C (not C++ :-) compiler at all times. That mysterious #if D2FIX is
similar. Does bfd already provide an MMAP facility?
You'll eventually want to go over the code with a fine tooth comb -
flush out the naughtness in the old dwarf2reader and eliminate the
neuances you, your self have introduced.
Andrew