This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Reset breakpoint after load?
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Jie Zhang <jie dot zhang at analog dot com>
- Cc: gdb at sourceware dot org
- Date: Thu, 21 Jan 2010 10:18:42 +0000
- Subject: Re: Reset breakpoint after load?
- References: <4B5560E0.3080901@analog.com>
On 19/01/2010 07:36, Jie Zhang wrote:
> gdb-comm.exp sets breakpoints on exit and abort before load. The problem
> is that GDB tries to skip prologue according to what it reads from
> memory, which might contain random data since the executable has not
> been loaded into memory. In my case, sometimes skip_prologue might skip
> one or two more instructions, which happens to be an exception
> instruction and will trap the processor into an exception event loop
> after running the executable before hit the breakpoints.
Something is wrong here. Before the inferior is started, gdb should be
looking at the prologue bytes from the executable image file, not the inferior
memory. Is something going wrong in gdb_comm_file_cmd()?
cheers,
DaveK