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

Unable to debug exasock application using gdb. #69

Open
kkrcPP opened this issue Feb 2, 2023 · 5 comments
Open

Unable to debug exasock application using gdb. #69

kkrcPP opened this issue Feb 2, 2023 · 5 comments

Comments

@kkrcPP
Copy link

kkrcPP commented Feb 2, 2023

Currently we are developing our application using exasock due to that we are facing problem in debugging our application using gdb as,
we have to execute our application with exasock in front i.e.(exasock ./appname) due to that gdb is unable to debug the application.

@badipietro
Copy link

badipietro commented Feb 7, 2023

You should be able to preload the exasock library before invoking gdb with something similar to the following:

exasock gdb --args application executable with parameter list

Also, for additional debugging the exasock library/system calls, can use the following:

exasock --trace --debug gdb --args application executable with parameter list

@gustavoale-saires
Copy link

I'm also unable to use gdb with exasock.
If I run exasock --debug gdb --args <myprogram> <my program arguments> the gdb will stuck at Starting program: ... after typing the command run.

@kkrcPP
Copy link
Author

kkrcPP commented Mar 29, 2023

I have the same issue Starting program: ... after typing the command run. Even the example.

@badipietro
Copy link

An alternative method is to invoke gdb as normal and then set the exec-wrapper:

(gdb) set exec-wrapper env LD_PRELOAD=/usr/local/lib/exasock/libexasock_preload.so

or for debug/trace:

(gdb) set exec-wrapper env LD_PRELOAD=/usr/local/lib/exasock/libexasock_preload_debug.so export EXASOCK_TRACE=1

There are other parameters in the /usr/local/bin/exasock wrapper script though the exasock wrapper and libs might be installed somewhere else on your system.

@gustavoale-saires
Copy link

An alternative method is to invoke gdb as normal and then set the exec-wrapper:

(gdb) set exec-wrapper env LD_PRELOAD=/usr/local/lib/exasock/libexasock_preload.so

or for debug/trace:

(gdb) set exec-wrapper env LD_PRELOAD=/usr/local/lib/exasock/libexasock_preload_debug.so export EXASOCK_TRACE=1

There are other parameters in the /usr/local/bin/exasock wrapper script though the exasock wrapper and libs might be installed somewhere else on your system.

That works for me. Thanks!

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

3 participants