tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GDB single-step fails on alpha (Re: CVS commit: src/share/mk)



On 2016/10/29 4:59, Martin Husemann wrote:
I am not sure what I am doing wrong but with my build (including your patch)
I get:

[/tmp] martin@gemini > gdb pwd
GNU gdb (GDB) 7.12
Copyright (C) 2016 Free Software Foundation, Inc.
..
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pwd...Reading symbols from /usr/libdata/debug//bin/pwd.debug...done.
done.
(gdb) break main
Breakpoint 1 at 0x1060: file /ssd/src/bin/pwd/pwd.c, line 71.
(gdb) run
Starting program: /bin/pwd
/tmp
[Inferior 1 (process 34) exited normally]


Does that work for you?

I understand the situation. That does not work also for me, regardless
of whether the patch is applied or not. It seems a bug related to
separate debugging symbols. Actually, the patched version of GDB works
for binaries with debugging symbols:

  % cc -g -O0 hello.c -o hello
  % gdb ./hello
  GNU gdb (GDB) 7.12
  ...
  Reading symbols from ./hello...done.
  (gdb) b main
  Breakpoint 1 at 0x120000968: file hello.c, line 7.
  (gdb) r
  Starting program: /home/rin/hello

  Breakpoint 1, main () at hello.c:7
  7               printf("Hello, World!\n");
  (gdb) s
  Hello, World!
  8               return 0;
  (gdb) s
  9       }
  (gdb) s
  0x00000001200008b8 in ___start ()
  (gdb) s
  Single stepping until exit from function ___start,
  which has no line number information.
  [Inferior 1 (process 575) exited normally]
  (gdb) q

However, on other platforms, it steps into printf() if separate debugging
symbols of libc are provided. But it does not on alpha. I will examine it
further...

Thanks,
Rin


Home | Main Index | Thread Index | Old Index