Sorry English isn't my first language.
I noticed something when setting breakpoints in GDB. It appears that they are ignored if symbols aren't loaded.
I have found it weird how GDB behaves when there are no symbols at all loaded and if I want to debug something I am having to set a break point at __libc_start_main@plt and nexti until I reach a the main binary. I also noticed that I cannot disassemble there in the main binary either (I receive this odd message "No function contains program counter for selected frame."), but that aside it break points are essentially ignored. I have found an odd work around and that is setting
set *0x56555878 = 0xcc
My questions are:
- Why does GDB behave so weirdly without symbols?
- Why do normal for breakpoints fail to be recognized?
- Is setting my desired breakpoints to 0xcc and then resting; Is this a good practice?
- Is there a better way to set breakpoints?
- Why can I not disassemble without Why can I not disassemble without symbols?
Edit: It looks like I cannot set *breakpoints in glibc but I can when I land in int main() program , But while in the int main() , I lose ability to disassemble.