Author Topic: Why the disassembly window can't indicates the CURRENT INSTRUCTION  (Read 4991 times)

Offline firstrose

  • Single posting newcomer
  • *
  • Posts: 3
The window shows instructions.But doesn't point out the current instruction.

I use:

CB 8.02
GDB 5.2.1

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Why the disassembly window can't indicates the CURRENT INSTRUCTION
« Reply #1 on: March 05, 2008, 03:14:25 pm »
Do I understand correctly that you want the current (or rather, next) instruction in the disassembly window highlighted when a breakpoint is reached?
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: Why the disassembly window can't indicates the CURRENT INSTRUCTION
« Reply #2 on: March 05, 2008, 11:03:25 pm »
I have simillar problem on XP with 8.02-MinGW version - when I open disassembly window it show contents of current function but it does not show the yellow triangle on the left indicating current eip location. But it seems to work on ubuntu (also 8.02)

Regards
   BYO

Offline firstrose

  • Single posting newcomer
  • *
  • Posts: 3
Re: Why the disassembly window can't indicates the CURRENT INSTRUCTION
« Reply #3 on: March 06, 2008, 01:45:19 am »
Do I understand correctly that you want the current (or rather, next) instruction in the disassembly window highlighted when a breakpoint is reached?

Absolutely YES!

It seems that I can express is correctly.

btw:I think BYO has the same problem.I use XP + CB8.02 + MingGW(current) + GDB 5.2.1.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Why the disassembly window can't indicates the CURRENT INSTRUCTION
« Reply #4 on: March 06, 2008, 08:07:06 am »
Hmm... that isn't particularly hard to do, if taking EIP is enough. The debugger plugin even already has that info available.

Of course it is a lot harder to do it correctly, as one line of source code usually maps several instructions. So actually, you would have to mark it like "statement goes from there to there, and EIP is here". That would require a backwards line translation... which shouldn't be too tough either, but it's not all too easy as the other thing.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline firstrose

  • Single posting newcomer
  • *
  • Posts: 3
Re: Why the disassembly window can't indicates the CURRENT INSTRUCTION
« Reply #5 on: March 06, 2008, 11:07:51 am »
Hmm... that isn't particularly hard to do, if taking EIP is enough. The debugger plugin even already has that info available.

Of course it is a lot harder to do it correctly, as one line of source code usually maps several instructions. So actually, you would have to mark it like "statement goes from there to there, and EIP is here". That would require a backwards line translation... which shouldn't be too tough either, but it's not all too easy as the other thing.

I knew that one line of source can map more than one instruction.

I must have write some ambiguous words.

Well,I mean: The disassembly window doesn't indicate the current EIP

Since the disassembly window shows the assembly instructions, highlighting the corresponding instructions to the source line means expecting toooo much........
« Last Edit: March 06, 2008, 03:48:47 pm by firstrose »

Offline engineer

  • Single posting newcomer
  • *
  • Posts: 4
Re: Why the disassembly window can't indicates the CURRENT INSTRUCTION
« Reply #6 on: October 16, 2008, 02:28:48 pm »
Hi @ all,

are there any News concerning this Topic?
Because I'd really appreciate the Feature of having the Line in the Dissassembly highlightened, where the eip points to. (I'm using XP with 8.02-MinGW version)
( Similar Question occurred here: http://forums.codeblocks.org/index.php/topic,8439.0/prev_next,prev.html#new )

This is my first Post here, so I'd like to shortly introduce myself:  :)
My name is David, and I'm a german student of "Electrical and Information Engineering". I'm currently searching for a functional Cpp IDE for "close to hardware" optimization of FDTD Applications. And C::B could be just what I'm looking for. :D

kind regards
/David