debugging dynamically loaded code

Friedrich Leisch Friedrich.Leisch@ci.tuwien.ac.at
Thu, 15 Jan 1998 12:13:13 +0100


How can I debug code that I load at runtime?

Currently I do the following:

	load R.binary into gdb
	run
	load shared object code using dyn.load()
	quit the R process

from then on gdb seems to be smart enough such that the source code
of the .so file is available and I can set breakpoints etc.

however, when I restart the R process I get:

(gdb) break printing.c:7
Breakpoint 1 at 0x407af036: file printing.c, line 7.
(gdb) run
Starting program: /usr/local/lib/R/bin/R.binary
Cannot insert breakpoint 1:
Temporarily disabling shared library breakpoints:


i.e., all breakpoints are disbled and I cannot figure out how to
enable them again (even after inserting the .so object).

Am I missing anything?

Best,
Fritz
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._