From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: Re: [RFA/RFC] New command: ``start'' Date: Wed, 19 May 2004 16:10:00 -0000 Message-id: <20040519161006.GF10684@gnat.com> References: <20040518024700.GV10684@gnat.com> <20040518214712.GD4036@nevyn.them.org> <20040518222740.GZ10684@gnat.com> <20040518224131.GA6026@nevyn.them.org> <20040519153615.GD10684@gnat.com> <20040519154155.GA8567@nevyn.them.org> X-SW-Source: 2004-05/msg00575.html > That sounds good to me. Note that now you can avoid playing with > xmalloc/xfree and just return the constant "main". Before starting on this, there are a couple of things we might want to discuss: . It think it would be better if we cached the main name, so as to avoid recomputing it each time we do a backtrace. But that causes a problem when debugging 2 different executables one after the other during the same GDB session. During the second debugging run, we'll end up using the wrong main procedure name. We need to insert an observer I think at the begining of exec_file_attach() to signal us that the cached main_name is obsolete. . Could you clarify a bit more what you mean about the xmalloc/xfree juggle? I see that set_main_name() takes care of this for me, so do you mean that the language method should be returning a string located in a temporary buffer? Something like: result is good until next call? (I am not too keen on that). Thanks, -- Joel