diff options
author | Vyacheslav Barinov <v.barinov@samsung.com> | 2018-07-04 16:13:29 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2018-07-04 16:13:29 +0100 |
commit | 1b919490e8ba30bf1d6941df0ed112b0e557017e (patch) | |
tree | 64d78f15a4de41831739f508ab170231b2c35ee4 /COPYING3.LIB | |
parent | 94d401b8b88a76b1372ce44e805516756a4f737b (diff) | |
download | gdb-1b919490e8ba30bf1d6941df0ed112b0e557017e.zip gdb-1b919490e8ba30bf1d6941df0ed112b0e557017e.tar.gz gdb-1b919490e8ba30bf1d6941df0ed112b0e557017e.tar.bz2 |
Warn if /proc is not accessiblegdb-8.2-branchpoint
There's a buildroot where I want to debug a binary, and I tried to
connect to it from outside, but got very weird errors like
architecture mismatch or protocol errors. At last, after switching on
'--debug' for gdbserver I found a message 'Can't open /proc/pid/'
message and suddenly found that I forgot to mount procfs in my
buildroot.
Make discovering the problem easier by making GDB / GDBserver warn
(even without --debug) if /proc can not be accessed.
Native debugging:
(gdb) start
Temporary breakpoint 1 at 0x400835: file test.c, line 10.
Starting program: /tmp/test
warning: /proc is not accessible.
GDBserver/remote debugging:
$ ./gdbserver :9999 ./gdbserver
gdbserver: /proc is not accessible.
gdb/ChangeLog:
2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
Pedro Alves <palves@redhat.com>
* linux-nat.c (linux_init_ptrace): Rename to ...
(linux_init_ptrace_procfs): ... this. Call
linux_proc_init_warnings.
(linux_nat_target::post_attach)
(linux_nat_target::post_startup_inferior): Adjust.
* nat/linux-procfs.c (linux_proc_init_warnings): Define function.
* nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
gdb/gdbserver/ChangeLog:
2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
Pedro Alves <palves@redhat.com>
* linux-low.c (initialize_low): Call linux_proc_init_warnings.
Diffstat (limited to 'COPYING3.LIB')
0 files changed, 0 insertions, 0 deletions