linuxdebuggingassemblygdbida

How can I change IDA global data type?


I am new to IDA and my IDA's version is 7.7.

I think it's quite difficult to read the data, especially for some struct with address: IDA .data

It's very easy to know the next node is 0x0804c110 in gdb: gdb

How can I fix this problem?

I tried to set Options-Regular-String and Options-Set Data Type but it still couldn't work as well as gdb.


Solution

  • IDA Pro has pretty good type system you could use. You could define each member of your struct as a proper data type like @StasSimonov suggested (and then mark your next field as an offset so that IDA shows it as such, and applies forward and back-references for your convenience.

    However besides elemental data types, IDA also supports composite data types i.e. structs (see https://hex-rays.com/products/ida/support/tutorials/structs/). So the best course of action would be to define your Node struct, mark next as offset and maybe type it as Node*. You could then mark your static data as proper structure type using Alt-Q shortcut. That would give you the best possible output, including named fields in the disassembly.