[m-dev.] gdb and Mercury

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Oct 26 19:30:47 AEST 1999


On 25-Oct-1999, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> Are there any particular options that are needed to be able to use gdb to debug 
> Mercury program on sparcs?
>
> Because it does not work for me:
> 
> 	$mmc --trace deep --c-debug queens
> 	$ mdb gdb ./queens
> 	GNU gdb 4.17
> 	Copyright 1998 Free Software Foundation, Inc.
> 	GDB is free software, covered by the GNU General Public License, and you are
> 	welcome to change it and/or distribute copies of it under certain conditions.
> 	Type "show copying" to see the conditions.
> 	There is absolutely no warranty for GDB.  Type "show warranty" for details.
> 	This GDB was configured as "sparc-sun-solaris2.4"...
> 	(gdb) break MR_trace_event_external
> 	Function "MR_trace_event_external" not defined.

Try setting a breakpoint on main(), and then setting
a breakpoint on MR_trace_event_external() after you have
got to main():

	(gdb) b main
	(gdb) c
	(gdb) b MR_trace_event_external

You can't set breakpoints on shared libraries until they have been loaded,
and when the program first starts, before main() has been reached, they
have not yet been loaded.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list