This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/RFA/i386] pb reading insns if breakpoints still inserted
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: brobecker at adacore dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Mon, 1 May 2006 18:36:24 +0200 (CEST)
- Subject: Re: [RFC/RFA/i386] pb reading insns if breakpoints still inserted
- References: <20060428171154.GP17613@adacore.com>
> Date: Fri, 28 Apr 2006 10:11:54 -0700
> From: Joel Brobecker <brobecker@adacore.com>
>
> Hello,
>
> following a discussion that started in:
>
> http://sources.redhat.com/ml/gdb-patches/2006-04/msg00345.html
>
> Here is a patch that fixes the problem. In summary: When we do next/step
> operations, we end up parsing the top frame function prologue and
> creating a frame_info with it. Unfortunately, at that point, the
> breakpoints are still inserted and that causes the prologue analyzer
> to misinterpret the function prologue and consequently breaks unwinding
> a bit.
>
> The fix that has been suggested is to fix the i386 prologue analyzer
> to handle inserted breakpoints. This is what the new read_insn()
> function does. I've always been very bad with names, so suggestions
> are more than welcome.
Hmm, I'm not entirely happy with the name, and I agree with jimb that
using current_frame here doesn't make sense. I was planning to look
into getting rid of the prologue skipper, but that isn't really going
to solve the problems.
After another day of thinking I came to the conclusion that jimb is
probably right about the premature deprecation of memory_read_nobpt.
If we undeprecate it, you wouldn't really need your new read_insn
function, since it really would be the same as memory_read_nobpt.
What do the other (global) maintainers think?
Mark
> 2006-04-28 Joel Brobecker <brobecker@adacore.com>
>
> * i386-tdep.c (read_insn): New function.
> (i386_follow_jump): Use read_insn to read instructions.
> (i386_analyze_struct_return): Likewise.
> (i386_skip_probe): Likewise.
> (i386_match_insn): Likewise.
> (i386_analyze_frame_setup): Likewise.
> (i386_analyze_register_saves): Likewise.
> (i386_skip_prologue): Likewise.