[Touch-packages] [Bug 1576432] Re: gdb crashes when trying to start a debugging session

2019-05-07 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: gdb (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to gdb in Ubuntu.
https://bugs.launchpad.net/bugs/1576432

Title:
  gdb crashes when trying to start a debugging session

Status in gdb:
  New
Status in gdb package in Ubuntu:
  Confirmed

Bug description:
  This bug log applies to Ubuntu Mate for raspberry PI.

  I cannot use gdb to debug a program. See below. This happens on any
  program, even programs that come with ubuntu, for example try gdb
  /bin/less. It always crashes in  d-linux-armhf.so.3

  gdb mythfrontend
  GNU gdb (Ubuntu 7.11-0ubuntu1) 7.11
  Copyright (C) 2016 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later 
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "arm-linux-gnueabihf".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  .
  Find the GDB manual and other documentation resources online at:
  .
  For help, type "help".
  Type "apropos word" to search for commands related to "word"...
  Reading symbols from mythfrontend...done.
  (gdb) start
  Temporary breakpoint 1 at 0x62c22: file main.cpp, line 1674.
  Starting program: 
/srv/storage/homexenial/peter/proj/mythtv-build/myth-p28/usr/bin/mythfrontend

  Program received signal SIGSEGV, Segmentation fault.
  0x76fd9822 in ?? () from /lib/ld-linux-armhf.so.3
  (gdb)

To manage notifications about this bug go to:
https://bugs.launchpad.net/gdb/+bug/1576432/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1576432] Re: gdb crashes when trying to start a debugging session

2018-05-01 Thread Chris Coulson
This occurs when gdb sets breakpoints on various probe events in the
dynamic loader. The probe event locations are exported from ld.so as SDT
markers, but gdb needs to know whether ARM or Thumb instructions are
being exported at each marker so that it can insert the appropriate
breakpoint instruction sequence. It does this by mapping the probe
location to a function symbol (see arm_pc_is_thumb in gdb/arm-tdep.c),
and using the target address of the symbol to determine if the function
is called in Thumb or ARM more (bit 0 of the target address will be set
for Thumb mode).

The problem here is that gdb can't map any of the probes to a symbol if
the debug symbols aren't installed, and arm_pc_is_thumb returns false in
this case (indicating ARM instructions).

But the probes that gdb sets breakpoints on are in dl_main, and dl_main is 
meant to be called in Thumb mode. See the output of readelf, noting that bit 0 
of the target address is set:
$ readelf -s /usr/lib/debug/lib/arm-linux-gnueabihf/ld-2.27.so | grep dl_main
42: 172d 10516 FUNCLOCAL  DEFAULT   11 dl_main

So without the debug symbols installed, gdb inserts the ARM breakpoint
instruction sequence for the dynamic loader probes, when it should be
inserting the Thumb instruction sequence. This is why it crashes.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to gdb in Ubuntu.
https://bugs.launchpad.net/bugs/1576432

Title:
  gdb crashes when trying to start a debugging session

Status in gdb:
  New
Status in gdb package in Ubuntu:
  New

Bug description:
  This bug log applies to Ubuntu Mate for raspberry PI.

  I cannot use gdb to debug a program. See below. This happens on any
  program, even programs that come with ubuntu, for example try gdb
  /bin/less. It always crashes in  d-linux-armhf.so.3

  gdb mythfrontend
  GNU gdb (Ubuntu 7.11-0ubuntu1) 7.11
  Copyright (C) 2016 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later 
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "arm-linux-gnueabihf".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  .
  Find the GDB manual and other documentation resources online at:
  .
  For help, type "help".
  Type "apropos word" to search for commands related to "word"...
  Reading symbols from mythfrontend...done.
  (gdb) start
  Temporary breakpoint 1 at 0x62c22: file main.cpp, line 1674.
  Starting program: 
/srv/storage/homexenial/peter/proj/mythtv-build/myth-p28/usr/bin/mythfrontend

  Program received signal SIGSEGV, Segmentation fault.
  0x76fd9822 in ?? () from /lib/ld-linux-armhf.so.3
  (gdb)

To manage notifications about this bug go to:
https://bugs.launchpad.net/gdb/+bug/1576432/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1576432] Re: gdb crashes when trying to start a debugging session

2018-05-01 Thread Chris Coulson
(Note, I looked at this because it was breaking rustc tests on armhf.
The workaround is the same - install libc6-dbg to make the crash go
away)

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to gdb in Ubuntu.
https://bugs.launchpad.net/bugs/1576432

Title:
  gdb crashes when trying to start a debugging session

Status in gdb:
  New
Status in gdb package in Ubuntu:
  New

Bug description:
  This bug log applies to Ubuntu Mate for raspberry PI.

  I cannot use gdb to debug a program. See below. This happens on any
  program, even programs that come with ubuntu, for example try gdb
  /bin/less. It always crashes in  d-linux-armhf.so.3

  gdb mythfrontend
  GNU gdb (Ubuntu 7.11-0ubuntu1) 7.11
  Copyright (C) 2016 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later 
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "arm-linux-gnueabihf".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  .
  Find the GDB manual and other documentation resources online at:
  .
  For help, type "help".
  Type "apropos word" to search for commands related to "word"...
  Reading symbols from mythfrontend...done.
  (gdb) start
  Temporary breakpoint 1 at 0x62c22: file main.cpp, line 1674.
  Starting program: 
/srv/storage/homexenial/peter/proj/mythtv-build/myth-p28/usr/bin/mythfrontend

  Program received signal SIGSEGV, Segmentation fault.
  0x76fd9822 in ?? () from /lib/ld-linux-armhf.so.3
  (gdb)

To manage notifications about this bug go to:
https://bugs.launchpad.net/gdb/+bug/1576432/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1576432] Re: gdb crashes when trying to start a debugging session

2018-04-19 Thread Seth Arnold
** Also affects: gdb (Ubuntu)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to gdb in Ubuntu.
https://bugs.launchpad.net/bugs/1576432

Title:
  gdb crashes when trying to start a debugging session

Status in gdb:
  New
Status in gdb package in Ubuntu:
  New

Bug description:
  This bug log applies to Ubuntu Mate for raspberry PI.

  I cannot use gdb to debug a program. See below. This happens on any
  program, even programs that come with ubuntu, for example try gdb
  /bin/less. It always crashes in  d-linux-armhf.so.3

  gdb mythfrontend
  GNU gdb (Ubuntu 7.11-0ubuntu1) 7.11
  Copyright (C) 2016 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later 
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "arm-linux-gnueabihf".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  .
  Find the GDB manual and other documentation resources online at:
  .
  For help, type "help".
  Type "apropos word" to search for commands related to "word"...
  Reading symbols from mythfrontend...done.
  (gdb) start
  Temporary breakpoint 1 at 0x62c22: file main.cpp, line 1674.
  Starting program: 
/srv/storage/homexenial/peter/proj/mythtv-build/myth-p28/usr/bin/mythfrontend

  Program received signal SIGSEGV, Segmentation fault.
  0x76fd9822 in ?? () from /lib/ld-linux-armhf.so.3
  (gdb)

To manage notifications about this bug go to:
https://bugs.launchpad.net/gdb/+bug/1576432/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp