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

Pedro Alves <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.