Hi: I am interested in how valgrind 2.4.0 starts up using it is own loader. I can trace its execution in the stage1, but in stage2, the source code is not linked to gdb, might because stage2 is loaded by stage1, and GDB does not know how to link the binary code to the source code. Can anyone tell me how to link the source code to the executed program? Best Regards Qin |
|
From: Tom H. <to...@co...> - 2005-04-11 15:40:48
|
In message <111...@we...>
Qin Zhao <zhaoqin@MIT.EDU> wrote:
> I am interested in how valgrind 2.4.0 starts up using it is own loader.
> I can trace its execution in the stage1, but in stage2, the source code is not
> linked to gdb, might because stage2 is loaded by stage1, and GDB does not know
> how to link the binary code to the source code. Can anyone tell me how to link
> the source code to the executed program?
The README_DEVELOPERS file explains how to debug stage2.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
It can load the stage2 source code, but still cannot map eip to the source code Quoting Tom Hughes <to...@co...>: > In message <111...@we...> > Qin Zhao <zhaoqin@MIT.EDU> wrote: > > > I am interested in how valgrind 2.4.0 starts up using it is own loader. > > I can trace its execution in the stage1, but in stage2, the source code is > not > > linked to gdb, might because stage2 is loaded by stage1, and GDB does not > know > > how to link the binary code to the source code. Can anyone tell me how to > link > > the source code to the executed program? > > The README_DEVELOPERS file explains how to debug stage2. > > Tom > > -- > Tom Hughes (to...@co...) > http://www.compton.nu/ > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |
|
From: Jeremy F. <je...@go...> - 2005-04-11 21:53:13
|
Qin Zhao wrote:
>It can load the stage2 source code, but still cannot map eip to the source code
>
It's easier if you configure with --disable-pie.
J
|
|
From: Nicholas N. <nj...@cs...> - 2005-04-11 15:46:21
|
On Mon, 11 Apr 2005, Qin Zhao wrote: > I am interested in how valgrind 2.4.0 starts up using it is own loader. > I can trace its execution in the stage1, but in stage2, the source code is not > linked to gdb, might because stage2 is loaded by stage1, and GDB does not know > how to link the binary code to the source code. Can anyone tell me how to link > the source code to the executed program? Section 2.3.4 of http://www.valgrind.org/docs/phd2004.pdf has a brief explanation which might be useful. N |