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]

[REVERSE] step-resume breakpoint at address get wrong if this address is same with stop_pc in reverse


Hi Michael,

Gdb-cvs-head still get error if step-resume breakpoint at address is
same with stop_pc in reverse.
For example:
cat 1.c
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdint.h>

int
main(int argc,char *argv[],char *envp[])
{
	
	printf ("123\n");

	cool ();

	printf ("123\n");

	return (0);
}
cat 1.s
.text
.global cool
cool:
ret;


gcc -g 1.c 1.s


gdb ./a.out
GNU gdb (GDB) 6.8.50.20090810-cvs
Copyright (C) 2009 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 "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb) start
Temporary breakpoint 1 at 0x8048385: file 1.c, line 15.
Starting program: /home/teawater/gdb/a.out

Temporary breakpoint 1, main (argc=<value optimized out>, argv=<value
optimized out>, envp=<value optimized out>)
    at 1.c:15
15		printf ("123\n");
(gdb) record
(gdb) n
123
17		cool ();
(gdb)
19		printf ("123\n");
(gdb)
123
21		return (0);
(gdb) rn
19		printf ("123\n");
(gdb) set debug infrun 1
(gdb) rn
infrun: clear_proceed_status_thread (process 23032)
infrun: proceed (addr=0xffffffff, signal=144, step=1)
infrun: resume (step=1, signal=0), trap_expected=0
infrun: wait_for_inferior (treat_exec_as_sigtrap=0)
infrun: target_wait (-1, status) =
infrun:   23032 [process 23032],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x80483b0
infrun: stepped into subroutine
infrun: inserting step-resume breakpoint at 0x80483b0
infrun: resume (step=0, signal=0), trap_expected=0
infrun: prepare_to_wait
infrun: target_wait (-1, status) =
infrun:   23032 [process 23032],
infrun:   status->kind = no-history
infrun: infwait_normal_state

No more reverse-execution history.
infrun: stop_stepping
main (argc=<value optimized out>, argv=<value optimized out>,
envp=<value optimized out>) at 1.c:15
15		printf ("123\n");


And AMD64 testsuite get error because the arch issue (You send a lot
of patches about it).

I will not work on it because you always have better idea with it.  :)


Thanks,
Hui


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