Is it possible to run GDB with a program built using asand related to ld? C gccadding a flag -gallows you to debug, but I get an error No symbol table is loaded. Use the "file" commandwhen I try to add breakpoints to a loaded program.
as
ld
gcc
-g
No symbol table is loaded. Use the "file" command
Thank!
EDIT Perhaps I should clearly indicate that I am learning and programming assembly. All I really need is a stack trace, but the ability to use GDB will be great.
Running permissionas -g does the trick.
as -g
Thanks to all who responded!!
. , , ; , . GNU as as -g. gcc -g: .s, .
gcc -g
.s
GDB : stabs, COFF, PE, DWARF, . ( , - , , , ELF.) gcc -g , , gcc -ggdb ( , , DWARF-3).
gcc -ggdb
, , gdb . , file, gdb, .
gdb
file
. , break *0x89abcdef, , - .
break *0x89abcdef
as -gdwarf-2 -g , ld -strip-debug makefile/install ,
, , , . GDB , .
Unless you have a character table, you cannot set breakpoints symbolically (by function name, line of code, etc.). You can still set a breakpoint for a specific address if you know the address you are trying to stop.
gdb> b 0x12345678
Of course, this is only useful if you know you want to stop at 0x12345678
What does fileyour executable say ?
Source: https://habr.com/ru/post/1729514/More articles:extract single line from HTML using Ruby / Mechanize (and Nokogiri) - ruby | fooobar.comHeapAlloc returns 0xC0000017: insufficient quota - heapСуществует ли схема XSD для оператора SQL Select - sqlPausing the game when someone calls / SMS, you are objective-cDjango: ошибки шаблона регистрации - djangoHow to implement element mapping in java? - javalog4net: error loading user application - log4netwhy do we integrate Qt with visual studio - qtwpf - updated non-communication dependency property - c #Assembly not loaded C # - c #All Articles