This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/16297] New: catch syscall read (syscall 0) doesn't work on Linux/x86_64
- From: "ppluzhnikov at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 06 Dec 2013 06:40:31 +0000
- Subject: [Bug breakpoints/16297] New: catch syscall read (syscall 0) doesn't work on Linux/x86_64
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16297
Bug ID: 16297
Summary: catch syscall read (syscall 0) doesn't work on
Linux/x86_64
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: breakpoints
Assignee: unassigned at sourceware dot org
Reporter: ppluzhnikov at google dot com
Using current trunk:
GNU gdb (GDB) 7.6.50.20131206-cvs
strace -e trace=read /bin/date
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340!\0\0\0\0\0\0"...,
832) = 832
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"...,
832) = 832
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200l\0\0\0\0\0\0"...,
832) = 832
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0"..., 4096)
= 2819
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0\0\0\0"..., 4096)
= 1802
Thu Dec 5 22:29:53 PST 2013
Clearly read is being invoked to load shared libraries, and to read
/usr/lib/locale/locale-archive
gdb /bin/date
GNU gdb (GDB) 7.6.50.20131206-cvs
Copyright (C) 2013 Free Software Foundation, Inc.
...
Reading symbols from /bin/date...(no debugging symbols found)...done.
(gdb) catch syscall read
Catchpoint 1 (syscall 'read' [0])
(gdb) run
Starting program: /bin/date
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Thu Dec 5 22:34:48 PST 2013
[Inferior 1 (process 10313) exited normally]
(gdb) quit
No problem with write (syscall 1).
Might this have something to do with _NR_read being 0 on Linux/x86_64?
Same problem reported for gdb Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1,
so this is likely not new.
--
You are receiving this mail because:
You are on the CC list for the bug.