This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Unexpected error setting hardware debug registers


Hi All,

I just build successfully GNU gdb (GDB) 7.6

When I use it on my -g compiled program I got this

GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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 "aarch64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/phi/.../p4-a-A...done.
(gdb) r .
Starting program: /home/phi/.../p4/p4-a-A .
Failed to read a valid object file image from memory.
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Unexpected error setting hardware debug registers <=== problem here? ====
(gdb)

I strace'd GDB and got this
.
.
.
ptrace(PTRACE_GETEVENTMSG, 8960, 0, 0x7fdd920888) = 0
ptrace(PTRACE_GETSIGINFO, 8960, 0, {si_signo=SIGTRAP, si_code=0x105, si_pid=8960
, si_uid=379, si_value={int=2968581904, ptr=0x7fb0f0f710}}) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
openat(AT_FDCWD, "/proc/8960/task/8960/stat", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f
b089e000
read(7, "8960 (p4-a-A) t 8762 8960 21289 "..., 1024) = 313
read(7, "", 1024)                       = 0
close(7)                                = 0
munmap(0x7fb089e000, 65536)             = 0
ptrace(PTRACE_PEEKTEXT, 8963, 0x7fb7fdfcc0, [0xd503201fd4200000]) = 0
ptrace(PTRACE_POKEDATA, 8963, 0x7fb7fdfcc0, 0xd503201fd65f03c0) = 0
ptrace(PTRACE_GETREGSET, 8960, 0x1, 0x7fdd920520) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
ptrace(PTRACE_SETREGSET, 8963, 0x403, 0x7fdd920398) = -1 EINVAL (Invalid argumen
t) <==================== (problem here ?) ====================
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGTTOU, {SIG_IGN, [TTOU], SA_RESTART}, {SIG_DFL, [TTOU], SA_RESTAR
T}, 8) = 0

Is this a know problem?
Thanx for any pointers.
Cheers,
Phi

PS : Dunno how to debug gdb when not having one that works, I mean I
got an earlier GDB (7.5) that don't work either, so basically I can't
debug GDB with GDB.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]