emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EMACS and valgrind (was: command and doco for valgrind)


From: Eli Zaretskii
Subject: Re: EMACS and valgrind (was: command and doco for valgrind)
Date: Tue, 20 Jan 2004 08:21:38 +0200

[Let's start a new thread for this.]

> Date: Mon, 19 Jan 2004 22:57:17 +0000
> From: Nick Roberts <address@hidden>
> 
> > Given this, I can't seem to find a way to run "valgrind ./temacs" under GDB,
> > and without that, how can I debug this?
> 
> I guess you've tried variants of "valgrind --gdb-attach=yes emacs". Thats what
> my original post was about :-)
> 
> The problem, here, is that gdb attaches to emacs after it has called
> memory_full.

Exactly.  Moreover, the code that just caused the problem is not the
code GDB will see.

> However, if I do p lisp_malloc_loser, I get something like:
> 
> $1 = (void *) 0x418aad88
> 
> so it looks like val is *set* from this value to 0 in the loop:
> 
>       if ((char *) XCONS (tem) != (char *) val + nbytes - 1)
>       {
>         lisp_malloc_loser = val;
>         free (val);
>         val = 0;
>       }

Yes, you are right, I think.

> I don't know about x86 internals but is this away from the heap and somewhere
> where shared libraries go?

I don't know either.  Anyone?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]