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]

Re: GDB loops forever until it crashes when it runs out of memory


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


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