Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdb.error There is no member named sxpinfo #1

Open
AndreMikulec opened this issue Feb 14, 2019 · 3 comments
Open

gdb.error There is no member named sxpinfo #1

AndreMikulec opened this issue Feb 14, 2019 · 3 comments

Comments

@AndreMikulec
Copy link

AndreMikulec commented Feb 14, 2019

Hi
,
I am trying to run "printer.py"
I am getting an error.
I am lost on how to fix it.

gdb> show directories

[debug]> show directories
[debug]Source directories searched: W:/R-3.5._/codeblocksMeta/CodeBlocks/out;$cdir;$cwd
[debug]>>>>>>cb_gdb:

Source directories searched: W:/R-3.5._/codeblocksMeta/CodeBlocks/out;$cdir;$cwd

I put the file there and source it

gdb> source printer.py

I debug through my code
Just AFTER I execute the following statement . . .

#include <R.h>
#include <Rinternals.h>
. . . 
SEXP ans = PROTECT(allocMatrix(REALSXP, nx, ny));

I try to print.
I get the following error.

[debug]> print ans
[debug]Python Exception <class 'gdb.error'> There is no member named sxpinfo.: 
[debug]Python Exception <class 'gdb.error'> There is no member named sxpinfo.: 
[debug]$4 = (SEXP) 0xb4f5e30
[debug]>>>>>>cb_gdb:

Python Exception <class 'gdb.error'> There is no member named sxpinfo.: 
Python Exception <class 'gdb.error'> There is no member named sxpinfo.: 
$4 = (SEXP) 0xb4f5e30

I try to source back in printer.py.
I get the following error.

[debug]> source printer.py
[debug]Traceback (most recent call last):
[debug]  File "printer.py", line 48, in <module>
[debug]    class Types:
[debug]  File "printer.py", line 55, in Types
[debug]    sexp_ptr_t    = gdb.lookup_type('SEXP').pointer()
[debug]gdb.error: No type named SEXP.
[debug]>>>>>>cb_gdb:

Traceback (most recent call last):
  File "printer.py", line 48, in <module>
    class Types:
  File "printer.py", line 55, in Types
    sexp_ptr_t    = gdb.lookup_type('SEXP').pointer()
gdb.error: No type named SEXP.

What am I doing wrong?

I am a python-gdb newbie.

Thanks,
Andre

@lbartnik
Copy link
Owner

Hi Andre, which OS are you using? I tested this only in Linux. I believe that it worked with the release build of R (no debug symbols) but at the same time the binary wasn't completely stripped. Where do you get your R binaries from?

@AndreMikulec
Copy link
Author

Łukasz,

Thanks for the response.
My platform is windows.

I also, compiled from source with many debugging symbols. I may have narrowed down the problem to "not getting debugging symbols (from R.exe). I submitted the question to r-devel.

Thanks,
Andre

@lbartnik
Copy link
Owner

TBH, I don't know if it will even work in Windows. I think R is still compiled with gdb but I don't know if gdb uses the same internal Python API to inspect debugee. I'm sorry, I have just never tested this little script under Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants