-
-
Notifications
You must be signed in to change notification settings - Fork 730
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
Add source context where available #9
Comments
That's a pretty good idea. Will add that. Thanks! |
- context_source: #9 print dynamic symbol resolution
Confirmed works on x86, ARM, PowerPC for |
By >7.9 you mean it only works on 7.10? I re-enabled the exception printing and I get:
|
Which version of python are you using inside gdb ? |
I don't know how to check that. System python is 2.7 but I thought gdb always links against 3 now? I'll google tomorrow :P |
Open a python shell in gdb ("pi" command), then
|
@bnagy |
|
I've setup an Ubuntu 14.04 with gdb 7.7 and python 3.4, could get your error triggered again. Is it happening against all your bins ? Or just one ? |
It's just one, by the looks - AND the source file happens to have a non-utf-8 character in the source file, so that sounds like a good chance to be the problem. I tried a quick guess from @bsmt using |
Do you have a sample somewhere I can download so I try to reproduce locally ? |
Can't really, with this one... you should be able to put any non utf-8 char in the source though like from http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt For now, I think I can run the codebase through iconv, which solves my immediate issue as per http://superuser.com/a/49147 (which is a possible workaround for anyone else with the issue, but hopefully it's easy to fix ;) |
Have you tried changing the charset (https://sourceware.org/gdb/onlinedocs/gdb/Character-Sets.html#Character-Sets) ? ( |
I tried Thanks again for the tool :) PS: Inplace fixing didn't seem to work for me. This script does. #! /bin/sh
find . -name '*.c' -exec iconv --verbose -f windows-1252 -t utf-8 -o {}.fix {} \;
find . -name "*.c" -delete
find . -name "*.c.fix" -exec rename 's/\.fix$//' {} \; |
I haven't been able to find a clean so I guess I will do as you suggest and close the ticket keeping in mind your little script in case this issue happens again in the future. Thanks for the feedbacks, always appreciated :) |
- context_source: hugsy#9 print dynamic symbol resolution
I love the gef commands, but when I have source I'd like to be able to see it...
gdb-dashboard shows source and asm if possible, just asm if not: https://github.com/cyrus-and/gdb-dashboard/blob/master/.gdbinit#L678-L752 which would be ideal...
The text was updated successfully, but these errors were encountered: