David Carlton | 1 May 2003 01:04
Picon

[rfa] struct dictionary

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)

David Carlton | 1 May 2003 01:13

[dictionary] move stuff from cp-support.c to cp-namespace.c

This patch moves some of the stuff that was in cp-support.c in my
branch but not in mainline to cp-namespace.c, where it more properly
belongs.  It also changes the 'maint print namespace' command in the
branch to be 'maint cplus namespace'.  There's nothing substantial
here, just mechanical stuff.

David Carlton
carlton <at> bactrian.org

2003-04-30  David Carlton  <carlton <at> bactrian.org>

	* Makefile.in (cp-namespace.o): Update dependencies.
	(cp-support.o): Ditto.
	* cp-support.h: Declare maint_cplus_cmd_list.
	* cp-namespace.c: Move variables namespace_block,
	possible_namespace_block, namespace_objfile here from
	cp-support.c.
	Move functions initialize_namespace_blocks, get_namespace_block,
	get_possible_namespace_block, free_namespace_blocks,
	check_one_possible_namespace_symbol,
	check_possible_namespace_symbols_loop, maintenance_print_namespace
	here from cp-support.c.
	Include objfiles.h, gdbtypes.h, dictionary.h, gdbcmd.h.
	* cp-namespace.c (_initialize_cp_namespace): New.
	(maintenance_cplus_namespace): Rename from
	maintenance_print_namespace.
	* cp-support.c (cp_find_first_component): Fix typo in comment.
	(_initialize_cp_support): Don't add 'maint print
	namespace'.
	Make maint_cplus_cmd_list extern.
(Continue reading)

David Carlton | 1 May 2003 02:51

[dictionary] merge with mainline

I've just merged the dictionary branch with mainline; merge tag is
carlton_dictionary-20030430-merge.  I also did a bit of regularizing
of its dictionary.{h,c} and block.h with the mainline patch that I
just posted; my apologies for not doing that as a separate commit with
a patch here, but the changes really are minimal.

Some random change in GDB during the time also caused
gdb.base/attach.exp to tickle a bug in code that I'd written to set
the name of anonymous objfiles; there's a similar bug on the mainline,
and I'll post a patch for it as soon as 'make check' finishes.

David Carlton
carlton <at> bactrian.org

2003-04-30  David Carlton  <carlton <at> bactrian.org>

	* cp-namespace.c (get_namespace_objfile): Copy the namespace
	objfile's name.

	* block.h (ALL_BLOCK_SYMBOLS): Move here from dictionary.h.
	* dictionary.c: Sync up with mainline version I just posted.
	Specifically, update some commments, and:
	(dict_create_hashed): Fiddle with nsyms updating.
	(dict_create_linear): Ditto.
	(dict_lookup): Delete.
	(iterator_next_hashed): Delete FIXME comment.
	(iter_name_first_hashed): Replace 'sym' by 'sym != NULL'.
	(iter_name_next_hashed): Replate 'next' by 'next != NULL'.
	* dictionary.h: Sync up with mainline version I just posted: add
	inclusion guards, delete declaration of dict_lookup, delete
(Continue reading)

David Carlton | 1 May 2003 02:57

[patch] allocate name of anonymous objfiles properly

In my earlier patch to make sure that anonymous objfiles have a name,
I neglected to ensure that the name is allocated properly.  This can
cause problems if an objfile is unloaded and loaded again, because in
that case somebody will try to free the name, which you can't do if
the name is a constant string.  Oops.

This patch fixes that; I've tested it with GCC 3.2, DWARF 2,
i686-pc-linux-gnu.  It seems obvious; I'll commit it on Friday unless
somebody objects.

David Carlton
carlton <at> bactrian.org

2003-04-30  David Carlton  <carlton <at> bactrian.org>

	* objfiles.c (allocate_objfile): For anonymous objfiles, allocate
	the name with mstrsave.

Index: objfiles.c
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.c,v
retrieving revision 1.29
diff -u -p -r1.29 objfiles.c
--- objfiles.c	25 Feb 2003 21:36:18 -0000	1.29
+++ objfiles.c	1 May 2003 00:41:31 -0000
 <at>  <at>  -325,7 +325,7  <at>  <at>  allocate_objfile (bfd *abfd, int flags)
     }
   else
     {
-      objfile->name = "<<anonymous objfile>>";
(Continue reading)

Eli Zaretskii | 1 May 2003 05:34
Picon

Re: [rfa] struct dictionary

> From: David Carlton <carlton <at> math.stanford.edu>
> Date: 30 Apr 2003 16:04:50 -0700
> 
> As promised in
> <http://sources.redhat.com/ml/gdb/2003-04/msg00177.html>, here's the
> 'struct dictionary' patch.

Are we going to have some docs about this in gdbint.texinfo?

Andrew Cagney | 1 May 2003 17:40
Picon
Favicon

[commit] Add frame_align to d10v.

Aligns the stack frame out to the size of an instruction (so that 
instructions can be safely pushed onto the stack).

committed,
Andrew
2003-05-01  Andrew Cagney  <cagney <at> redhat.com>

	* d10v-tdep.c (d10v_frame_align): Replace d10v_stack_align.
	(d10v_gdbarch_init): Set frame_align instead of stack_align.

Index: d10v-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/d10v-tdep.c,v
retrieving revision 1.110
diff -u -r1.110 d10v-tdep.c
--- d10v-tdep.c	30 Apr 2003 22:01:37 -0000	1.110
+++ d10v-tdep.c	1 May 2003 15:36:38 -0000
 <at>  <at>  -107,9 +107,11  <at>  <at> 
 static void d10v_eva_get_trace_data (void);

 static CORE_ADDR
-d10v_stack_align (CORE_ADDR len)
+d10v_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
 {
-  return (len + 1) & ~1;
+  /* Align to the size of an instruction (so that they can safely be
+     pushed onto the stack.  */
+  return sp & ~3;
(Continue reading)

Kris Warkentin | 1 May 2003 17:41

[PATCH] (dagnabbit) QNX Neutrino i386 support

Well, I'd love to just be submitting a patch to all the already committed
stuff but since you guys haven't approved my stuff yet, now I have to submit
the whole darn thing again.  Serves you right. ;-)

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
===================================================================
(Continue reading)

Mark Kettenis | 1 May 2003 20:39
Picon

Re: [i386newframe/PATCH] New i386newframe branch

   Date: Mon, 28 Apr 2003 18:22:36 -0400
   From: Andrew Cagney <ac131313 <at> redhat.com>

   > +static int
   > +i386_frameless_function_invocation (struct frame_info *frame)
   >  {

   I'd consider deleting it.

   For non legacy architectures, apart from appending "(FRAMELESS)" to the 
   output of "info frame", that architecture method does nothing useful 
   (and even this is marginal :-).  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 :-).  No problem.
(Continue reading)

Andrew Cagney | 1 May 2003 23:11
Picon
Favicon

[patch rfc, rfa:doco] Working on-stack generic dummy frames

Hello,

This patch makes all the changes necessary to get breakpoint on-stack 
call dummys working.  Until the ``set call breakpoint-location'' command 
is added, a target will need to explicitly set the call dummy location 
to on stack.

I've tested it with the d10v.

The actual change involves:

- burry all the old FIX_CALL_DUMMY code in a new function 
legacy_push_dummy_code (clearing the way for their deprecation)

- addition of the architecture vector method push_dummy_code that is 
responsible for allocating space for a breakpoint (and anything else) on 
the stack (there is a default)

- adding a d10v_push_dummy_code
This needed to handle an DADDR (the SP) vs IADDR (the BP_ADDR) problem

- pass the BP_ADDR to push_dummy_call (instead of dummy_addr)

I'll look to commit this in a few days.

Andrew

PS: Tasks, such as modifying "infrun.c" so that it will treat a SIGSEG 
on a breakpoint instruction as a breakpoint, and changing the SPARC to 
to this mechanism, are left as exercises for the reader :-)
(Continue reading)

David Carlton | 1 May 2003 23:15
Picon

Re: [rfa] struct dictionary

On Thu, 01 May 2003 06:34:07 +0300, "Eli Zaretskii" <eliz <at> elta.co.il> said:
>> From: David Carlton <carlton <at> math.stanford.edu>

>> As promised in
>> <http://sources.redhat.com/ml/gdb/2003-04/msg00177.html>, here's the
>> 'struct dictionary' patch.

> Are we going to have some docs about this in gdbint.texinfo?

It's a refactoring of 'struct block', which isn't currently mentioned
in gdbint.texinfo.  So it seems to me that doing so isn't urgent.

David Carlton
carlton <at> math.stanford.edu


Gmane