bug-hurd
[Top][All Lists]
Advanced

[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: Mon, 26 Mar 2012 21:51:18 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux)

Hi!

Samuel Thibault <address@hidden> skribis:

> Ludovic Courtès, le Sat 24 Mar 2012 22:24:38 +0100, a écrit :
>> There might still be something wrong with the user-space stack trace
>> though, but it could be due to something else:
>> 
>>   $ addr2line -pfa -e 
>> /nix/store/dsw2yh0sxidmijg2y3vjps1mqjvx6q5w-hurd-0-i586-pc-gnu/hurd/auth 
>> 0x103ac23
>>   0x0103ac23: ??
>>   ??:0
>> 
>> (The Hurd above is compiled with -O1.)
>
> Is it compiled with -fno-omit-frame-pointer too?  -O enables omitting
> frame pointers "where doing so does not interfere with debugging.", but
> the mach debugger is probably very poor in that regard.

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.

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]