1 May 2003 01:04
[rfa] struct dictionary
David Carlton <carlton <at> math.stanford.edu>
2003-04-30 23:04:50 GMT
2003-04-30 23:04:50 GMT
As promised in <http://sources.redhat.com/ml/gdb/2003-04/msg00177.html>, here's the 'struct dictionary' patch. I've tested this on GCC 3.2, DWARF 2, i686-pc-linux-gnu, and have been using it on my branch for months. Most of the work is generic; the two special cases are jv-lang.c and mdebugread.c. I'm fairly sure I got the former right; the mdebugread.c changes are big enough that I could easily have slipped up somewhere. (Though I have tested the data structures that are used by mdebugread.c but not by buildsym.c.) So obviously somebody should test this on a machine using mdebugread.c; any volunteers? This is orthogonal to my current namespace patch awaiting review, but I will use these mechanisms in my next namespace patch. David Carlton carlton <at> math.stanford.edu 2003-04-28 David Carlton <carlton <at> bactrian.org> * dictionary.h: New. * dictionary.c: New. * block.h: Add opaque declaration for struct dictionary. (struct block): Add 'dict' member; delete 'hashtable', 'nsyms', 'sym' members. (BLOCK_DICT): New macro. Delete macros BLOCK_HASHTABLE, BLOCK_NSYMS, BLOCK_SYM, BLOCK_BUCKETS, BLOCK_BUCKET, BLOCK_HASHTABLE_SIZE, BLOCK_SHOULD_SORT.(Continue reading)
I've gone and refactored a bunch of stuff again. I simplified the interface
into the backend target stuff since we were doing a lot of work for
registers that we didn't need to.
The main (and cool) thing that I did was to take all the backend functions,
put them into a target vector and create defines for all the functions just
like is done in target.h and a few other places. I think it's much more
elegant this way and it also will make it possible to create a multi-arch
gdb for Neutrino down the road.
cheers,
Kris
ChangeLog
* configure.tgt: Add i386nto target
* i386-nto-tdep.c: New file. i386 specific support for QNX Neutrino.
* nto-tdep.c: New file. Neutrino target support routines.
* nto-tdep.h: New file. Neutrino target header.
* config/tm-qnxnto.h: New file.
* config/i386/i386nto.mt: New file.
* config/i386/tm-i386nto.h: New file.
Index: configure.tgt
===================================================================
. I think a per frame
PRINT_EXTRA_FRAME_INFO like function would be more useful.
Alternatively, a per-frame ``frameless'' attribute could be added.
Sounds good to me!
> +const struct frame_unwind *
> +i386_frame_p (CORE_ADDR pc)
> +{
> + char *name;
> +
> + find_pc_partial_function (pc, &name, NULL, NULL);
> + if (PC_IN_SIGTRAMP (pc, name))
> + return &i386_sigtramp_frame_unwind;
The intent was for there to be one predicate function per unwinder. So
the below would be in a separate unwinder, registered separatly.
And you want me to set the right example
RSS Feed