Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 25956 - Assembly view doesn't show whole function
Summary: Assembly view doesn't show whole function
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 2.0   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-10 15:29 EST by Johan Walles CLA
Modified: 2016-12-10 14:12 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Walles CLA 2002-11-10 15:29:19 EST
Do this:
1. Start debugging a program.
2. Stop some functions down into the stack.
3. Select a stack frame that has no source code associated with it.
4. Enable assembly view.

Current result:
* A bunch of instructions (30?) starting at the current instruction pointer are
displayed, regardless of which ones belong to the current function or not.

Expected result:
* If the function boundaries are known, assembly for the whole function should
get displayed, and not anything else.  Since in my case addresses are decorated
with the offset from the function's starting address, in my case the function
boundaries are known, and this is what I should have had to view.
Comment 1 Johan Walles CLA 2002-11-28 10:51:06 EST
For debugging a memory location that GDB knows nothing about, see bug 27239.
Comment 2 Nobody - feel free to take it CLA 2002-12-05 10:59:31 EST
This is partially fixed. Now the Disassembly view displays only the 
instructions that belong to the current function. But the first instruction of 
the view is the current instruction pointer not the first instruction of the 
function (as it should be).
The problem is that GDB/MI "data-disassemble" command unlike 
GDB/CLI "disassemble" accepts only file name and line number or start address 
and end address as arguments.
Comment 3 Johan Walles CLA 2002-12-05 11:37:16 EST
According to the GDB/MI docs (and my own experiments), GDB/MI supports ordinary
GDB commands as well.  I can't say how well this will be supported in future GDB
releases or anything, but you can actually say "disassemble foo" and get all of
foo() disassembled.

This feels kind of hackish to me, but it could solve the problem.
Comment 4 Johan Walles CLA 2002-12-05 11:39:30 EST
Actually, I just discovered you get different output from "disassemble" and
"-data-disassemble", so depending on how you parse stuff that may not be a
solution after all.
Comment 5 Doug Schaefer CLA 2007-06-22 12:56:15 EDT
LATER/REMIND are deprecated. Changing to reopened milestone '--'
Comment 6 Jonah Graham CLA 2016-12-10 14:12:59 EST
The current disassembly view is infinite if scrolled up and down. Marking resolved.