User forums > Using Code::Blocks

Need help displaying data in assembly language

(1/3) > >>

Ray Seyfarth:
I have selected Code::Blocks as the IDE for my C++ classes for this coming semester.  It is quite ready for use for C++.  I would like to select it for my assembly class (next fall), but it needs one feature.  I will be using the yasm assembler which I have working well within CB, but there is a lack of support for inspection of data in memory.  I would like a tool which would allow me to display one of more memory locations based on a hexadecimal address.  The watch facility seems somewhat close to what I would like.  I need to have a mechanism for entering an address for a variable or an array along with the basic data type for the variable.  Adding a watch is nice for C++ where the assembler knows the type of variables.  Unfortunately no such data is available from yasm.

I have downloaded the code, but hope that someone more familiar with CB will tell me how to do this task with the code as is, or suggest a reasonable way to add the required functionality.

Thanks

Ray Seyfarth

oBFusCATed:
Have you tried the examine memory window?

Ray Seyfarth:

--- Quote from: oBFusCATed on December 06, 2011, 09:24:28 pm ---Have you tried the examine memory window?

--- End quote ---

Yes, I have.  This provides for 1 dump of memory data and only as bytes.  I would like to have multiple regions with types like byte, short, int, long, float, double, and C strings.  Also the dump is restricted to a handful of various power of 2 sizes.  Ideally each of the regions would also have a label so that I could identify the purpose of the variable or array.

Thanks

Ray

oBFusCATed:
Is this thing possible with command line gdb?
If it is not we can't add support for it in C::B.

Ray Seyfarth:

--- Quote from: oBFusCATed on December 06, 2011, 10:27:04 pm ---Is this thing possible with command line gdb?
If it is not we can't add support for it in C::B.

--- End quote ---

How about "x/4xg 0x7fffffffe5b0"?  This prints 4 64 bit integers in hexadecimal.

Or "x/10fw 0x602010"?  This prints 10 4 byte floating point values.

I've done quite a bunch of these commands in gdb in the past month or two teaching assembly language.

Ray

Navigation

[0] Message Index

[#] Next page

Go to full version