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: patch for printing 64-bit values in i386 registers; STABS format


On Mon, Apr 28, 2003 at 12:08:17PM -0400, Andrew Cagney wrote:
> 
> >>The stabs reader will need to be modified so that it generates a proper 
> >>location description.  Note that it is STABS centric.  dwarf2 doesn't 
> >>need that mechanism since (presumably) GCC is generating the correct 
> >>info (....).
> >
> >
> >No, that's incorrect.  GDB wouldn't even be able to find half the value
> >if GCC was putting out correct information.  We can't fix that until
> >GDB is ready to not choke on the result.  We will have to handle the
> >incorrect debug info probably forever.
> 
> I made two assertions:
> 
> - stabs
> - dwarf2 (where I included a ``presumably'')
> 
> You're saying that both are incorrect?

I guess that depends where you draw the line between the two assertions
:)

 - It's not stabs centric; I imagine that if someone went in to update
mdebug or hp support they'd have the same problem.  Well, maybe not hp. 
That's a real kitchen sink format from what I recall.

 - generated dwarf2 is not correct

but

 - stabs would have to be modified (if we did this fixup in each and
every debug reader, instead of in read_var_value and friends; I see
good arguments both ways)

> >This is one of the intended purposes of this mechanism, and as I 
> >>indicated, is needed by MIPS.  Being able to project an arbitrary [debug 
> >>info] view of the registers onto the raw register buffer.
> >>
> >>BTW, what happens when there is an attempt to write a long long value? 
> >>GDB again assumes that it can write to contigious registers - the reason 
> >>why REGISTER_BYTE can't be killed.
> >
> >
> >That ugliness could go away too with Mark's introduced method.  GDB
> >could be fixed to find the next register properly.
> 
> GDB also uses it to encode offsets into a register.  It also does not 
> help the MIPS where the debug register does need to be projected into 
> the raw registers.   Why have add more mechanisms when the existing one 
> is sufficient.  Focus the effort on fixing the real problem.
> 
> BTW, my comment about no names was wrong.  They can be named, that 
> restriction should have been removed by the introduction of reggroups.

Well, in that case I guess it would work.  Let's do it?

It still feels much more like a hack to me than Mark's approach; I'll
just quietly disagree I suppose.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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