[Bug gdb/25215] systemtap probes appear to break armhf gdb with arm64 kernel

michael.hudson at canonical dot com sourceware-bugzilla@sourceware.org
Fri Nov 22 23:17:00 GMT 2019


https://sourceware.org/bugzilla/show_bug.cgi?id=25215

--- Comment #4 from Michael Hudson-Doyle <michael.hudson at canonical dot com> ---
(In reply to Frank Ch. Eigler from comment #2)
> Could be worth dumping the .note.stapsdt section here, along with a
> disassembly of the affected functions (init_start etc.), to confirm that the
> addresses are computed correctly by gas.

root@disco:~# readelf -x .note.stapsdt /lib/ld-linux-armhf.so.3

Hex dump of section '.note.stapsdt':
  0x00000000 08000000 27000000 03000000 73746170 ....'.......stap
  0x00000010 73647400 d2280000 cc7e0100 00000000 sdt..(...~......
  0x00000020 72746c64 00696e69 745f7374 61727400 rtld.init_start.
  0x00000030 2d344023 30203440 72340000 08000000 -4@#0 4@r4......
  0x00000040 2a000000 03000000 73746170 73647400 *.......stapsdt.
  0x00000050 842e0000 cc7e0100 00000000 72746c64 .....~......rtld
  0x00000060 00696e69 745f636f 6d706c65 7465002d .init_complete.-
  0x00000070 34402330 20344072 34000000 08000000 4@#0 4@r4.......
  0x00000080 27000000 03000000 73746170 73647400 '.......stapsdt.
  0x00000090 06430000 cc7e0100 00000000 72746c64 .C...~......rtld
  0x000000a0 006d6170 5f666169 6c656400 2d344072 .map_failed.-4@r
  0x000000b0 33203440 72350000 08000000 26000000 3 4@r5......&...
  0x000000c0 03000000 73746170 73647400 cc460000 ....stapsdt..F..
  0x000000d0 cc7e0100 00000000 72746c64 006d6170 .~......rtld.map
  0x000000e0 5f737461 7274002d 34407233 20344072 _start.-4@r3 4@r
  0x000000f0 35000000 08000000 2e000000 03000000 5...............
  0x00000100 73746170 73647400 c0de0000 cc7e0100 stapsdt......~..
  0x00000110 00000000 72746c64 006d6170 5f636f6d ....rtld.map_com
  0x00000120 706c6574 65002d34 40723320 34407236 plete.-4@r3 4@r6
  0x00000130 20344072 34000000 08000000 28000000  4@r4.......(...
  0x00000140 03000000 73746170 73647400 44df0000 ....stapsdt.D...
  0x00000150 cc7e0100 00000000 72746c64 0072656c .~......rtld.rel
  0x00000160 6f635f73 74617274 002d3440 72332034 oc_start.-4@r3 4
  0x00000170 40723200 08000000 30000000 03000000 @r2.....0.......
  0x00000180 73746170 73647400 9ce10000 cc7e0100 stapsdt......~..
  0x00000190 00000000 72746c64 0072656c 6f635f63 ....rtld.reloc_c
  0x000001a0 6f6d706c 65746500 2d344072 33203440 omplete.-4@r3 4@
  0x000001b0 72322034 40723400 08000000 28000000 r2 4@r4.....(...
  0x000001c0 03000000 73746170 73647400 38ea0000 ....stapsdt.8...
  0x000001d0 cc7e0100 00000000 72746c64 00756e6d .~......rtld.unm
  0x000001e0 61705f73 74617274 002d3440 72352034 ap_start.-4@r5 4
  0x000001f0 40723400 08000000 2b000000 03000000 @r4.....+.......
  0x00000200 73746170 73647400 00ec0000 cc7e0100 stapsdt......~..
  0x00000210 00000000 72746c64 00756e6d 61705f63 ....rtld.unmap_c
  0x00000220 6f6d706c 65746500 2d344072 33203440 omplete.-4@r3 4@
  0x00000230 72340000 08000000 29000000 03000000 r4......).......
  0x00000240 73746170 73647400 3c200100 cc7e0100 stapsdt.< ...~..
  0x00000250 00000000 72746c64 00736574 6a6d7000 ....rtld.setjmp.
  0x00000260 34407230 202d3440 72312034 40723134 4@r0 -4@r1 4@r14
  0x00000270 00000000 08000000 29000000 03000000 ........).......
  0x00000280 73746170 73647400 a8200100 cc7e0100 stapsdt.. ...~..
  0x00000290 00000000 72746c64 006c6f6e 676a6d70 ....rtld.longjmp
  0x000002a0 00344072 30202d34 40723120 34407234 .4@r0 -4@r1 4@r4
  0x000002b0 00000000 08000000 31000000 03000000 ........1.......
  0x000002c0 73746170 73647400 da200100 cc7e0100 stapsdt.. ...~..
  0x000002d0 00000000 72746c64 006c6f6e 676a6d70 ....rtld.longjmp
  0x000002e0 5f746172 67657400 34407230 202d3440 _target.4@r0 -4@
  0x000002f0 72312034 40723134 00000000          r1 4@r14....

Not sure how to disassemble the functions you want so I uploaded the ld-2.29.so
(and detached symbols) to:

https://people.canonical.com/~mwh/ld-2.29.so
https://people.canonical.com/~mwh/ld-2.29.so-detached

> Could be worth getting a native armhf gdb binary to run against the same
> one, in case there's an arm64-cross-armhf incompatibility.

This is an armhf gdb binary. Its running in a container on a machine running an
arm64 kernel though.

> Could be worth running gdb with more tracing (gdb) set debug target 999

https://paste.ubuntu.com/p/PtBKQwDZTg/

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list