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

move src to new path, breakpoints not work #22

Open
ziyouchutuwenwu opened this issue Jan 1, 2021 · 4 comments
Open

move src to new path, breakpoints not work #22

ziyouchutuwenwu opened this issue Jan 1, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@ziyouchutuwenwu
Copy link

ziyouchutuwenwu commented Jan 1, 2021

i made a demo project with debug info. in the original path, gdbfrontend works great.
if a move the whole project dir to new dir, i click "Load Executable", it shows the original src path, and when i click the src file appeared in the left panel, it popuped with error msg "Path not found".
then i click the "add source" button which is in the right corner of the "Sources" panel. select my source file, set breakpoints.

but when i click the "debug" button, the demo bin just run, no breakpoint hit, info looks like this
image

@ziyouchutuwenwu
Copy link
Author

if i set src path manually, kdbg can know it, and if possible, would gdbfrontend find debug symbol files from relative path as first choice?

@rohanrhu
Copy link
Owner

rohanrhu commented Jan 1, 2021

Hi, Thank you for your feedback. Breakpoints are setting by full paths for now. I will check it out to make it to work with relative paths.

Have a nice day.

@rohanrhu rohanrhu added the enhancement New feature or request label Jan 1, 2021
@rohanrhu rohanrhu added this to To do in v1.0 Roadmap Jan 1, 2021
@grooverdan
Copy link

grooverdan commented Jan 12, 2022

Related,

MariaDB container for remote debuggging:

$  podman run -d --rm -p 2345  --cap-add CAP_SYS_PTRACE --name mdb-debug -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1   quay.io/mariadb-foundation/mariadb-debug:10.2
$ podman port mdb-debug 2345
0.0.0.0:41021
$   podman exec --user mysql -ti  mdb-debug gdbserver --attach  :2345 1
Attached; pid = 1
Listening on port 2345
Remote debugging from host 10.0.2.100

I used a target remote :41021 on the gdb command line. I explicitly running gdbfrontend from a checked out source directory:
(this uses a gdb-12 debugger that actually fetches the debug info).

Then set the breakpoint, continued. Triggered with $ podman exec -ti mdb-debug mysql -e 'set global innodb_buffer_pool_size=256*10*1024*1024'

resulting in:

image

However the relative info in the debuginfo can't automatically translate to the PWD as its been changed.

@rohanrhu
Copy link
Owner

Related,

MariaDB container for remote debuggging:

$  podman run -d --rm -p 2345  --cap-add CAP_SYS_PTRACE --name mdb-debug -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1   quay.io/mariadb-foundation/mariadb-debug:10.2
$ podman port mdb-debug 2345
0.0.0.0:41021
$   podman exec --user mysql -ti  mdb-debug gdbserver --attach  :2345 1
Attached; pid = 1
Listening on port 2345
Remote debugging from host 10.0.2.100

I used a target remote :41021 on the gdb command line. I explicitly running gdbfrontend from a checked out source directory: (this uses a gdb-12 debugger that actually fetches the debug info).

Then set the breakpoint, continued. Triggered with $ podman exec -ti mdb-debug mysql -e 'set global innodb_buffer_pool_size=256*10*1024*1024'

resulting in:

image

However the relative info in the debuginfo can't automatically translate to the PWD as its been changed.

Helloo, when you click a line gutter, GDBFrontend sets that breakpoint with absolute path of source file. I will find a solution for this.

You can start GDBFrontend on your remote machine and connect to that from your local machine instead of using gdbserver.

Since gdbserver limits some functionalities, I think running GDBFrontend on remote machine and connecting that from local machine is more useful. Soooo is there a special reason to use gdbserver?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
v1.0 Roadmap
  
To do
Development

No branches or pull requests

3 participants