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

-break-insert response doesn't respect target.source-map #103

Open
brownts opened this issue Jan 4, 2023 · 0 comments
Open

-break-insert response doesn't respect target.source-map #103

brownts opened this issue Jan 4, 2023 · 0 comments

Comments

@brownts
Copy link

brownts commented Jan 4, 2023

The "fullname" field in the response doesn't contain the mapped path. I've captured both the lldb-mi and gdb commands and traces for comparison. Based on the mapping the /usr/src/hello_world.c source path should be mapped to /home/troy/git/hello_world_c/hello_world.c, but is instead being reported without the mapping (i.e., /usr/src/hello_world.c).

lldb-mi

commands
lldb-mi
settings append target.source-map /usr/src /home/troy/git/hello_world_c
settings show target.source-map
-file-exec-and-symbols hello_world
-break-insert -t -f main
lldb-mi trace
> lldb-mi
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'lldb.embedded_interpreter'
(gdb)
settings append target.source-map /usr/src /home/troy/git/hello_world_c
^done
(gdb)
settings show target.source-map
~"target.source-map (path-map) =\n[0] \"/usr/src\" -> \"/home/troy/git/hello_world_c\"\n\n"
^done
(gdb)
-file-exec-and-symbols hello_world
^done
(gdb)
=library-loaded,id="/home/troy/git/hello_world_exe/hello_world",target-name="/home/troy/git/hello_world_exe/hello_world",host-name="/home/troy/git/hello_world_exe/hello_world",symbols-loaded="0",loaded_addr="-",size="1560"
-break-insert -t -f main
^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",pending=["main"],times="0",addr="0x000000000000114f",func="main",file="hello_world.c",fullname="/usr/src/hello_world.c",line="8",original-location="main"}
(gdb)
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="del",enabled="y",pending=["main"],times="0",addr="0x000000000000114f",func="main",file="hello_world.c",fullname="/usr/src/hello_world.c",line="8",original-location="main"}
(gdb)

gdb

commands
gdb -q --interpreter=mi2
-gdb-set substitute-path /usr/src /home/troy/git/hello_world_c
-file-exec-and-symbols hello_world
-break-insert -t -f main
trace
gdb -q --interpreter=mi2
=thread-group-added,id="i1"
(gdb) 
-gdb-set substitute-path /usr/src /home/troy/git/hello_world_c
^done
(gdb) 
-file-exec-and-symbols hello_world
^done
(gdb) 
-break-insert -t -f main
^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x000000000000114f",func="main",file="hello_world.c",fullname="/home/troy/git/hello_world_c/hello_world.c",line="8",thread-groups=["i1"],times="0",original-location="main"}
(gdb)
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

1 participant