[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Better debugging support in Mach
From: |
Ludovic Courtès |
Subject: |
Re: Better debugging support in Mach |
Date: |
Tue, 27 Mar 2012 11:25:25 +0200 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux) |
Hey!
Thomas Schwinge <thomas@schwinge.name> skribis:
> On Mon, 26 Mar 2012 21:51:18 +0200, ludo@gnu.org (Ludovic
> =?iso-8859-1?Q?Court=E8s?=) wrote:
[...]
>> Yes, but ‘-fomit-frame-pointer’ is enabled “at levels `-O', `-O2',
>> `-O3', `-Os'” (info "(gcc) Optimize Options").
>>
>> Anyway, building with “-O1 -fno-omit-frame-pointer” yields slightly
>> better, yet imperfect traces:
>>
>> db> show task
>> TASK THREADS
>> 5 (e0823c60): 4 threads:
>> 0 (e083e548) R F
>> 1 (e083e2a8) W (0xc014c4b0) 0
>> 2 (e084ce80) R (0xc014c4b0)
>> 3 (e084cbe0) W (0xc014c620) 0
>> db> trace/tu
>> 0xc011eae9(c027c819,e0823c60,17,e083e548,e0847ef8)
>> 0xc014ee59(e0820dc0,17,e0847ef8,128bc70,a)
>> 0xc01529dc(1,17,e0847ef8,e0824d20,ea0359c8)
>> 0xc0106d40(128fdbc,2000,a,800,0)
>> >>>>> user space <<<<<
>> 0x103ac3d(1,0,0,0,3a)
>> 0x103af69(804ccf8,80494ec,7530,0,0)
>> 0x804a2a3(1,128fed4,128fedc,f3d4,128fed4)
>> Bad frame pointer: 0x1
>>
>> and:
>>
>> $ addr2line -pfa -e result/hurd/auth 0x103ac3d 0x103af69 0x804a2a3
>> 0x0103ac3d: ??
>> ??:0
>> 0x0103af69: ??
>> ??:0
>> 0x0804a2a3: main at
>> /tmp/nix-build-3bm2lp9lkj6bczd61p9qj1ramlpxy7wh-hurd-0-i586-pc-gnu.drv-0/hurd-20120326/auth/auth.c:523
>>
>> The strange thing is that the top-most part is correct.
>
> I would bet this is ld.so/libc.so/etc.
Oops, indeed.
With a statically-linked auth, the situation is much better:
$ addr2line -pfai -e result/hurd/auth 0x804cea5 0x804d1a0 0x8049a47
0x8059ffa0 0xeb810811
0x0804cea5: thread_function at
/tmp/nix-build-j0kklj5b651rar28sqrglqd6x29l7sxx-hurd-0-i586-pc-gnu.drv-0/hurd-20120326/libports/manage-multithread.c:140
0x0804d1a0: ports_manage_port_operations_multithread at
/tmp/nix-build-j0kklj5b651rar28sqrglqd6x29l7sxx-hurd-0-i586-pc-gnu.drv-0/hurd-20120326/libports/manage-multithread.c:170
0x08049a47: main at
/tmp/nix-build-j0kklj5b651rar28sqrglqd6x29l7sxx-hurd-0-i586-pc-gnu.drv-0/hurd-20120326/auth/auth.c:523
Thanks!
Ludo’.