Package: gdb

Our gdb doesn't work on PIE binaries. I don't know why you'd ever want
to do this, but right now samba is linked that way. I'm just going to
file a bug over there asking them to stop, but this should probably be
fixed anyway. Supposedly fedora's gdb works; I haven't tried it.

Sample:

[EMAIL PROTECTED]:~$ cat hello.c
#include <stdio.h>
#include <unistd.h>
int main(void)
{
  printf("Hello, fuckers!\n");
  sleep(1000);
  return 0;
}
[EMAIL PROTECTED]:~$ gcc -pie -o hello hello.c
[EMAIL PROTECTED]:~$ gdb hello
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library 
"/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) b main
Breakpoint 1 at 0x612
(gdb) r
Starting program: /home/asuffield/hello
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x612: Input/output error.


I couldn't find anything that actually worked, gdb does not appear to
understand these binaries at all. Most notably, it cannot attach to
their processes and produce a stack trace, which is proving to be
quite problematic for debugging samba.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'                          |
   `-             -><-          |

Attachment: signature.asc
Description: Digital signature

Reply via email to