I'm new with gdb and I have spent hours looking for direction but I can't find any.
I need to analyze an executable to find how this program process the arguments and where the output came from. I have it running on my system, got it working correctly to print some encoded string.
After some days trying gdb, I figure that I need to trace the data inside every function, but I can't pass this function __libc_init where the program alwas exited with code 0235. The last process says __libc_init () from /system/lib/libc.so
so i think it's doing something with this external library libc.so. How could I continue the debug process when I hit this type of process? I can't find any reference to understand this.
Add a comment
|
1 Answer
If you cannot step inside that function, you’re probably missing debug symbols for the library (check with info shared). You can try to either install symbols (usually in a package named libc-dbg or similar), or debug on assembly level by using si (step instruction) command.
-
this is new for me, i thought that the external library debug symbol not required in this process. for the code itself, i have make sure that the debug symbol is available. i think i'm not interested with the external library's process, so i want to skip to when this library call is finish, and check for output and other values. is it possible?Sarah Audina– Sarah Audina2020-06-05 04:37:21 +00:00Commented Jun 5, 2020 at 4:37
-
If you want to know why it’s exiting in that function, you’ll have to go inside.2020-06-05 05:47:12 +00:00Commented Jun 5, 2020 at 5:47
-
ooh so that's how it is. i think gdb is too advanced for now. gonna try analyze the strace and objdump output now before going back here and try your advice. thankyou!Sarah Audina– Sarah Audina2020-06-05 13:12:17 +00:00Commented Jun 5, 2020 at 13:12