Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-07-2008, 10:17 PM   #1
Registered: Aug 2005
Posts: 298

Rep: Reputation: 30
gdb debugging assembly with no symbols


I'm debugging a program that doesn't have any symbols. Is it posible to get gdb to print out the assembly instructions that its going to execute? all it tells me is

<address> ??()

Thank you
Old 08-08-2008, 09:35 AM   #2
Steve K.
LQ Newbie
Registered: Jul 2004
Location: Portland, OR
Posts: 15

Rep: Reputation: 1
I use KDevelop as my IDE. When debugging in KDevelop a tab labeled Disassemble is available to see assembly code for the program being debugged. I haven't used it, so I can say nothing beyond its existence.
Old 08-08-2008, 11:36 AM   #3
Registered: Oct 2002
Location: Delft, Netherlands
Distribution: Gentoo
Posts: 196

Rep: Reputation: 33
You can use command "disassemble". If you want details you type "help disassemble".

Using gdb from Kdevelop would be much easiear, if possible install KDevelop.
Old 08-08-2008, 01:13 PM   #4
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
"help disassemble" is the ticket.

Here's a good tutorial:
Old 08-15-2008, 09:11 PM   #5
Registered: Aug 2005
Posts: 298

Original Poster
Rep: Reputation: 30
Is it possible to have gdb print out the assembly instruction to be executed after I type something like stepi or nexti. Its really annoying to type "disassemble $pc ($pc+1)" to get the current instruction.

Basicly I'm looking at a compiled executable and trying to understand how it works. I do not have the source code for the executable.

Thank you
Old 10-01-2008, 08:47 PM   #6
LQ Newbie
Registered: Oct 2008
Posts: 1

Rep: Reputation: 0

display/i $pc

This makes gdb display the next instruction to execute everytime you stop.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Little Help Debugging some MINOR kernel assembly Norweed Linux - Kernel 2 03-28-2008 10:32 AM
Help debugging with gdb and core files Programming 1 05-28-2005 04:58 AM
Assembly debugging using DDD bluknight43 Programming 1 02-28-2005 01:02 PM
i have used 'ggdb3' when i compile a software,why gdb didn't find debugging symbols icoming Programming 0 08-30-2004 01:35 PM
gdb assembly dump centr0 Programming 3 07-07-2003 11:38 AM

All times are GMT -5. The time now is 11:18 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration