This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB loops forever until it crashes when it runs out of memory
- From: Pedro Alves <palves at redhat dot com>
- To: Raphael Zulliger <zulliger at indel dot ch>, "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Tue, 19 Aug 2014 15:12:32 +0100
- Subject: Re: GDB loops forever until it crashes when it runs out of memory
- Authentication-results: sourceware.org; auth=none
- References: <53EAF38B dot 8080306 at indel dot ch>
On 08/13/2014 06:11 AM, Raphael Zulliger wrote:
> I don't know about the philosophy of GDB, whether it is supposed to
> handle such situation. However, for me, the following additional code
> helped to avoid the GDB crash which gave me a chance to inspect the rest
> of the system with a Eclipse/CDT:
>
> new_val = get_frame_register_value (frame, regnum);
> if( (regnum == VALUE_REGNUM(new_val))
> && (frame == frame_find_by_id (VALUE_FRAME_ID (new_val)) )) {
> set_value_lazy (val, 0);
> mark_value_bytes_unavailable (val,
> value_embedded_offset (val),
> TYPE_LENGTH (type));
> return 0;
> }
>
> As I'm unfamiliar with GDB internals, I don't know whether I compared
> the right properties of and new_val and whether the implementation is
> "ok" like this - but at least this code helped to make GDB properly
> abort trying to unwind the stack after it received the same information
> twice.
This sounds like the issue addressed by 33f8fe58 (and follow ups).
What version of GDB are you using?
--
Thanks,
Pedro Alves