User forums > Help

debugging an R language dll

(1/2) > >>

Andre_Mikulec:
Hi,

I am trying to use code::blocks Debugger to debug an R language dll.

The process is unusual. But (below) the process is correct.

I managed to configure the debugger to give me this line.

Starting debugger: W:\gdb2018-07-25-bundle-python27\bin\gdb.exe -nx -fullname -quiet W:\R-3.5._\App\R-Portable\bin\i386\Rgui.exe  -args W:/R-3.5._/codeblocksMeta/CodeBlocks/gdbCgen/bin/Debug/gdbCgen.exe

In the gdb debugger, when I run. I get this.

```
run
No executable specified, use `target exec'.
Starting program: 
```
From Windows command line testing, I know need to remove "-args W:/R-3.5._/codeblocksMeta/CodeBlocks/gdbCgen/bin/Debug/gdbCgen.exe
".

Therefore, only left would be
```
W:\gdb2018-07-25-bundle-python27\bin\gdb.exe -nx -fullname -quiet W:\R-3.5._\App\R-Portable\bin\i386\Rgui.exe
```
This is correct and by design. ( There is no gdbCgen.exe: never was and never will be. )

How do I remove the extra?

If the removal can not easily be done, then where in the source code, can I make this modification.

Note: Currently,  I use debugbreak.exe to do the breaking (CTRL+C).

Thanks,

Andre

ollydbg:

--- Quote ---Starting debugger: W:\gdb2018-07-25-bundle-python27\bin\gdb.exe -nx -fullname -quiet W:\R-3.5._\App\R-Portable\bin\i386\Rgui.exe  -args W:/R-3.5._/codeblocksMeta/CodeBlocks/gdbCgen/bin/Debug/gdbCgen.exe
--- End quote ---

I think you use the wrong command.

here, you want to use GDB.exe to debug the "Rgui.exe". "gdbCgen.exe" is an argument passed to the start command of the "Rgui.exe".

Normally, you try first try this in Windows Command line, such as:

--- Code: ---gdb.exe -nx -fullname -quiet  -args W:\R-3.5._\App\R-Portable\bin\i386\Rgui.exe

--- End code ---

After that, you can set the args:

--- Code: ---set args W:/R-3.5._/codeblocksMeta/CodeBlocks/gdbCgen/bin/Debug/gdbCgen.exe

--- End code ---

Finally, you can type:

--- Code: ---run

--- End code ---
To start the debugging.

Under C::B's debugger plugin, you use the same way, the command line arguments are set in "Menu->Project->Set program argument..."

EDIT: Please enable the "Full Debug log" in your C::B's debugger plugin settings to show the full debug log.

Andre_Mikulec:
ollydbg,

Thanks.

My build processes has no compiler and no linker.

I just want to use  the code::blocks GUI Debugger.
I am not really debugging Rgui.exe. I am debugging a .dll that I will load later (example not shown).

Debugging is also composed of a python-gdb debugger (example shown below) and
a pretty-printing .py script that expands SEXP expressions (not shown in the example above).

The debugging process starts with debugging the Rgui.exe.  But I am not really debugging it.
I am  running RGui, then loading a pre-compiled special debuggable dll: . dyn.load("foo.dll").
Then I use an RGui menu command to break to gdb.  In gdb I set a breakpoint at foo:3.
Next, I break out of gdb using debugbreak.exe,
Back inn RGui, I run the dll using .C("foo", parameters ).

This
"
W:/R-3.5._/codeblocksMeta/CodeBlocks/gdbCgen/bin/Debug/gdbCgen.exe
"
is automatically filled in by the code::blocks Debugging: gdbCgen does not exist.

How do I  stop code::blocks from filing this in?

This is preventing me from running the debugger using the way I want it to run it.

Thanks,
Andre

oBFusCATed:
Make a dummy, probably custom makefile project and set the output to be you're executable. Or find a way to set the host executable. See Project -> Set program's arguments.

If this is too complex you can always do Debug -> Attach.

Andre_Mikulec:
ollydbg and oBFusCATed,

O.K.thanks. The gist of my question was "is there" an easy way.

I understand that the Debugger is hard coded to accept an XYZ.exe
(and I have to provide some 'real' XYZ.exe)

I will try those solutions.

Thanks,
Andre

Navigation

[0] Message Index

[#] Next page

Go to full version