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

shell/?: gdb error #46

Closed
mmaechtel opened this issue Mar 30, 2017 · 11 comments
Closed

shell/?: gdb error #46

mmaechtel opened this issue Mar 30, 2017 · 11 comments
Assignees
Labels

Comments

@mmaechtel
Copy link
Contributor

(gdb) list
1 int main(int argc, char const *argv[])
2 {
3 int *x = 0;
4 int y = *x + 1;
5 return 0;
6 }
(gdb) b 3
Breakpoint 1 at 0x400540: file null.c, line 3.
(gdb) run
Starting program: /home/maechtel/tmp/null
/nix/store/pbs5sfnp9bfv27vz9m7h64w3zgkavfqd-perl-5.22.2/bin/perl: symbol lookup error: /nix/store/pbs5sfnp9bfv27vz9m7h64w3zgkavfqd-perl-5.22.2/bin/perl: undefined symbol: rm
[Inferior 1 (process 2263) exited with code 0177]
(gdb)

@mmaechtel
Copy link
Contributor Author

mmaechtel commented Mar 30, 2017

gcc 6.3 with gdb.unwrapped seems to work ... ??

@steveej
Copy link
Contributor

steveej commented Apr 1, 2017

Can you try adding the readline pkg to the code dependencies of the shell?

EDIT: I can't reproduce this within the bsys labshell. Which environment does this happen in?

@steveej steveej changed the title gdb error shell/?: gdb error Apr 1, 2017
@mmaechtel
Copy link
Contributor Author

hmmm, now it works I cannot reproduce it anymore ... maybe with my next examples, which I will try tomorrow ...

@mmaechtel
Copy link
Contributor Author

#48

@mmaechtel
Copy link
Contributor Author

now i can debug programs compiled with"export hardeningDisable=all" step by step. Couldn't do it without "export hardeningDisable=all"

@steveej
Copy link
Contributor

steveej commented Apr 2, 2017

I understand that for specific cases, but the symbol lookup error is not explained by optimized code.

@mmaechtel
Copy link
Contributor Author

than I ran into other troubles before ...

@mmaechtel
Copy link
Contributor Author

I meant step-by-step with step=line in code.

@mmaechtel
Copy link
Contributor Author

I had this trouble even when I compiled with -g or -O0 ....

@steveej
Copy link
Contributor

steveej commented Apr 2, 2017

I think if you passed -g and/or -O0 these are overriden by the gcc wrapper if hardeningDisable=all is not set.

I'm confused about the state of this now. Do you still have any issues after setting hardeningDisable=all?

@mmaechtel
Copy link
Contributor Author

I'm also confused but with hardeningDisable=all I think I had no troubles any more 👍

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

No branches or pull requests

2 participants