This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA/dwarf: Fix the GCC 2.95.3 store.exp regression for multi-register variables


My test bed says that this is okay.  It fixes the regression in
store.exp with gcc 2.95.3 -gdwarf-2 (gcc 2.95.3 is the only compiler
that puts this particular struct into a register).  And it doesn't
have any regressions with any gcc v2 or v3, dwarf-2 or stabs+,
on my native i686-pc-linux-gnu.

I have another PR for this, gdb/1107, that comes with a source file
and an executable file.  With this patch, gdb HEAD changes from
'new bad behavior' back to 'same bad behavior as 5.3'.  Specifically,
I have a structure which is in %ebx and %esi.  gdb 5.3 prints values
from %ebx and %esp (the next register in 'info registers').
gdb HEAD prints %ebx and something from god knows where, and
gdb HEAD + patch prints %ebx and %esp again.

(I really hate it when gdb prints the wrong numbers!)

With this patch gdb is better in the store.exp case and not any
worse in the gdb/1107 case.  What the heck, here's a table:

                    store.exp  gdb/1107
  gdb 5.3           okay       wrong
  gdb HEAD          wrong      wrong
  gdb HEAD + drow   okay       wrong

So ... recommended for approval.  If it goes in then we can maybe talk
about gdb/1107 some more.

Michael C

===

2003-03-12  Daniel Jacobowitz  <drow at mvista dot com>

	* dwarf2expr.h (struct dwarf_expr_context): Remove extra arguments
	to read_reg and update its comment.  Remove regnum member.
	* dwarf2expr.c (execute_stack_op): Remove memaddr and expr_lval.
	Don't call read_reg when setting in_reg.  Call read_reg to get
	the frame base if it's in a register.  Return the register number
	on the stack instead of in the context.  Remove extra arguments
	to read_reg.
	* dwarf2loc.c (dwarf_expr_read_reg): Remove extra arguments.
	(dwarf2_evaluate_loc_desc): Call value_from_register.  Expect
	the register number on the expression stack.
	(needs_frame_read_reg): Remove extra arguments.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]