This is the mail archive of the 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: ping: [patch 1/2] Fix gdb.cp/gdb2495.exp regression with gcc-4.7 #5

On Mon, 11 Jun 2012 21:24:59 +0200, Joel Brobecker wrote:
>   1. Ignore the initial regression, and release with it

This is not good, this regresses a nice C++ fixup by Tom.

>   2. Revert the patch that caused the regression. I can't remember
>      which patch that was, and whether it would "unsolve" an important
>      issue.

The regression is due to binutils fix by Jakub Jelinek:

There is nothing to revert.  The original assumption _start has no unwind info
was just wrong.  Moreover there was a bug that it relied upon the fact that
.plt has no unwind info.  But after fixing it to make it really _start (and
not .plt) some archs (ppc IIRC) has unwind info even for _start.

>   3. Ignore the side-effect/regression caused by this fix, and fix
>      it later

Yes, I find it a viable alternative.

>   4. Delay the release in order to implement setjmp handling.

I already tried to implement it once but somehow did not finish it.  I do no
like much that even the longjmps tracking is not a perfect solution.

It would be best to find some other safe place where to put a breakpoint.
Maybe to override the address choosing in i386-linux-tdep.c and reuse return
address to _start?  Therefore to put breakpoint at 0x7fffffffda58 (+ 7):

Dump of assembler code for function _start:
   0x0000000000489560 <+0>:	xor    %ebp,%ebp
   0x0000000000489584 <+36>:	callq  0x488180 <__libc_start_main@plt>
=> 0x0000000000489589 <+41>:	hlt    
   0x000000000048958a <+42>:	xchg   %ax,%ax
   0x000000000048958c <+44>:	nopl   0x0(%rax)
(gdb) x/gx 0x7fffffffda58
0x7fffffffda58:	0x0000000000489589


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