[PATCH] Fix AMD64 backtrace
Andreas Jaeger
aj@suse.de
Mon Jan 12 16:44:00 GMT 2004
Jakub Jelinek <jakub@redhat.com> writes:
> On Sat, Jan 10, 2004 at 05:10:18PM +0100, Andreas Jaeger wrote:
>> --- sysdeps/unix/sysv/linux/x86_64/__start_context.S 27 Aug 2003 23:03:41 -0000 1.2
>> +++ sysdeps/unix/sysv/linux/x86_64/__start_context.S 10 Jan 2004 16:09:40 -0000
>> @@ -1,4 +1,4 @@
>> -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
>> +/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
>> This file is part of the GNU C Library.
>> Contributed by Andreas Jaeger <aj@suse.de>, 2002.
>>
>> @@ -33,6 +33,7 @@ ENTRY(__start_context)
>> movq %rbx, %rsp
>
> This is not reflected in the unwind info.
> Unless %rbx points to a populated stack with correct caller
> something needs to be done about it.
It should point to a populated stack:
/* This removes the parameters passed to the function given to
'makecontext' from the stack. RBX contains the address
on the stack pointer for the next context. */
But yeah, we destroy %rsp - so what can we do here?
>
>> --- sysdeps/x86_64/strcspn.S 29 Apr 2003 22:47:18 -0000 1.2
>> +++ sysdeps/x86_64/strcspn.S 10 Jan 2004 16:09:41 -0000
>> @@ -1,7 +1,7 @@
>> /* strcspn (str, ss) -- Return the length of the initial segment of STR
>> which contains no characters from SS.
>> For AMD x86-64.
>> - Copyright (C) 1994-1997, 2000, 2002, 2003 Free Software Foundation, Inc.
>> + Copyright (C) 1994-1997, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
>> This file is part of the GNU C Library.
>> Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>.
>> Bug fixes by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>.
>> @@ -40,6 +40,7 @@ ENTRY (strcspn)
>> table. */
>> movq %rdi, %r8 /* Save value. */
>> subq $256, %rsp /* Make space for 256 bytes. */
>> + cfi_adjust_cfa_offset(-256)
>
> Typo/pasto.
Fixed and committed - thanks,
Andreas
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SuSE Linux AG, Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-hacker/attachments/20040112/aa6e5f75/attachment.sig>
More information about the Libc-hacker
mailing list