mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-03-01 13:26:47 +08:00
I see these failures, when running with the native-gdbserver of native-extended-gdbserver boards: Running /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.reverse/finish-reverse-next.exp ... FAIL: gdb.reverse/finish-reverse-next.exp: reverse next 1 LEP from function body FAIL: gdb.reverse/finish-reverse-next.exp: reverse next 2 at b = 5, from function body FAIL: gdb.reverse/finish-reverse-next.exp: reverse next 1 GEP call from function body FAIL: gdb.reverse/finish-reverse-next.exp: reverse next 2 at b = 50 from function body Let's use this simpler program to illustrate the problem: int main() { int a = 362; a = a * 17; return a; } It compiles down to: int a = 362; 401689: c7 45 fc 6a 01 00 00 movl $0x16a,-0x4(%rbp) a = a * 17; 401690: 8b 55 fc mov -0x4(%rbp),%edx 401693: 89 d0 mov %edx,%eax 401695: c1 e0 04 shl $0x4,%eax 401698: 01 d0 add %edx,%eax 40169a: 89 45 fc mov %eax,-0x4(%rbp) return a; 40169d: 8b 45 fc mov -0x4(%rbp),%eax When single stepping these lines, debugging locally, while recording, these are the recorded instructions (basically one for each instruction shown above): (gdb) maintenance print record-instruction 0 4 bytes of memory at address 0x00007fffffffdc5c changed from: 6a 01 00 00 Register rip changed: (void (*)()) 0x40169a <main+21> (gdb) maintenance print record-instruction -1 Register rax changed: 5792 Register eflags changed: [ PF AF IF ] Register rip changed: (void (*)()) 0x401698 <main+19> (gdb) maintenance print record-instruction -2 Register rax changed: 362 Register eflags changed: [ PF ZF IF ] Register rip changed: (void (*)()) 0x401695 <main+16> (gdb) maintenance print record-instruction -3 Register rax changed: 4200069 Register rip changed: (void (*)()) 0x401693 <main+14> (gdb) maintenance print record-instruction -4 Register rdx changed: 140737488346696 Register rip changed: (void (*)()) 0x401690 <main+11> (gdb) maintenance print record-instruction -5 4 bytes of memory at address 0x00007fffffffdc5c changed from: 00 00 00 00 Register rip changed: (void (*)()) 0x401689 <main+4> (gdb) maintenance print record-instruction -6 Not enough recorded history But when debugging remotely: (gdb) maintenance print record-instruction 0 Register rdx changed: 140737488346728 Register rip changed: (void (*)()) 0x401690 <main+11> (gdb) maintenance print record-instruction -1 4 bytes of memory at address 0x00007fffffffdc7c changed from: 00 00 00 00 Register rip changed: (void (*)()) 0x401689 <main+4> (gdb) maintenance print record-instruction -2 Not enough recorded history In this list, we only have entries for the beginning of each line. This is because of the remote target's support for range stepping. The record-full layer can only record instructions when the underlying process target reports a stop. With range stepping, the remote target single-steps multiple instructions at a time, so the record-full target doesn't get to see and record them all. Fix this by making the record-full layer disable range-stepping before handing the resume request to the beneath layer, forcing the remote target to report stops for each instruction. Change-Id: Ia95ea62720bbcd0b6536a904360ffbf839eb823d |
||
---|---|---|
bfd | ||
binutils | ||
config | ||
contrib | ||
cpu | ||
elfcpp | ||
etc | ||
gas | ||
gdb | ||
gdbserver | ||
gdbsupport | ||
gnulib | ||
gold | ||
gprof | ||
gprofng | ||
include | ||
intl | ||
ld | ||
libbacktrace | ||
libctf | ||
libdecnumber | ||
libiberty | ||
libsframe | ||
opcodes | ||
readline | ||
sim | ||
texinfo | ||
zlib | ||
.cvsignore | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
ar-lib | ||
ChangeLog | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING3 | ||
COPYING3.LIB | ||
COPYING.LIB | ||
COPYING.LIBGLOSS | ||
COPYING.NEWLIB | ||
depcomp | ||
djunpack.bat | ||
install-sh | ||
libtool.m4 | ||
lt~obsolete.m4 | ||
ltgcc.m4 | ||
ltmain.sh | ||
ltoptions.m4 | ||
ltsugar.m4 | ||
ltversion.m4 | ||
MAINTAINERS | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
makefile.vms | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
multilib.am | ||
README | ||
README-maintainer-mode | ||
SECURITY.txt | ||
setup.com | ||
src-release.sh | ||
symlink-tree | ||
test-driver | ||
ylwrap |
README for GNU development tools This directory contains various GNU compilers, assemblers, linkers, debuggers, etc., plus their support routines, definitions, and documentation. If you are receiving this as part of a GDB release, see the file gdb/README. If with a binutils release, see binutils/README; if with a libg++ release, see libg++/README, etc. That'll give you info about this package -- supported targets, how to use it, how to report bugs, etc. It is now possible to automatically configure and build a variety of tools with one command. To build all of the tools contained herein, run the ``configure'' script here, e.g.: ./configure make To install them (by default in /usr/local/bin, /usr/local/lib, etc), then do: make install (If the configure script can't determine your type of computer, give it the name as an argument, for instance ``./configure sun4''. You can use the script ``config.sub'' to test whether a name is recognized; if it is, config.sub translates it to a triplet specifying CPU, vendor, and OS.) If you have more than one compiler on your system, it is often best to explicitly set CC in the environment before running configure, and to also set CC when running make. For example (assuming sh/bash/ksh): CC=gcc ./configure make A similar example using csh: setenv CC gcc ./configure make Much of the code and documentation enclosed is copyright by the Free Software Foundation, Inc. See the file COPYING or COPYING.LIB in the various directories, for a description of the GNU General Public License terms under which you can copy the files. REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info on where and how to report problems.