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] | |
hello,
I noticed a problem trying to print the value of a variable with
a program compiled with GNAT (based on GCC 3.2.3). The problem
comes from the fact that GDB does not compute the correct frame
base. I think this is related to the fact that the function frame
is larger than usual. Here is the what the assembly code looks
like:
_ada_dbtest
.PROC
.CALLINFO FRAME=18880,CALLS,SAVE_RP,ENTRY_GR=3
.ENTRY
stw %r2,-20(%r30)
copy %r3,%r1
copy %r30,%r3
stwm %r1,8128(%r30)
addil L'10752,%r30
ldo R'10752(%r1),%r30
As you see, the frame size as published in the unwind record
is 18880 bytes, and the frame is setup in 3 instructions:
stwm %r1,8128(%r30)
addil L'10752,%r30
ldo R'10752(%r1),%r30
Unfortunately, a little oops in prologue_inst_adjust_sp()
made it miss the second instruction:
/* addil high21,%r1; ldo low11,(%r1),%r30)
save high bits in save_high21 for later use. */
if ((inst & 0xffe00000) == 0x28200000)
There is a small confusion in the source register for the addil
instruction. The actual sequence should be
addil high21,%r30
ldo low11(%r1),%r30
I think the confusion comes from the fact that the result of
the sum is stored in %r1.
Anyway, I replaced r1 by r30 in the check above, and that fixed
the problem.
2004-12-31 Joel Brobecker <brobecker@gnat.com>
* hppa-tdep.c (prologue_inst_adjust_sp): Fix small confusion
in register number for ldil instruction.
Tested on HP/UX 11.00, no regression.
OK to apply?
--
Joel
PS: I will be away for 3 weeks starting Jan 3rd, so please apply this
change for me if approved after I leave. Thank you!
Attachment:
ldil.diff
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |