GDB & DDD - change a base of data.

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
wojtek
Posts: 4
Joined: Sat Mar 15, 2014 4:59 am

GDB & DDD - change a base of data.

Post by wojtek »

Hi everyone
Now I'm trying use GDB with Bochs,and i have a question, how change base address of data in GDB.
In example:
System is in protected mode, base of data segment is 0x500, and I set variable x=100.
Now I examine x in GDB, and he display another value.
How to get him to show the correct value of x?
Sorry about my english.
Host OS: Linux Debian
Kernel type: microkernel
Kernel format: now flat binary, in future ELF.
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: GDB & DDD - change a base of data.

Post by VolTeK »

What's his name again?
Nable
Member
Member
Posts: 453
Joined: Tue Nov 08, 2011 11:35 am

Re: GDB & DDD - change a base of data.

Post by Nable »

to wojtek:
Moving from flat binary to ELF would be (IMHO) the simplest solution for your problem.
Then you can read this and this (I've found these articles in google and they helped me, you can find something other if you don't like this set).
It looks like optional argument of add-symbol-file is what you need.
User avatar
wojtek
Posts: 4
Joined: Sat Mar 15, 2014 4:59 am

Re: GDB & DDD - change a base of data.

Post by wojtek »

Nable wrote:Moving from flat binary to ELF would be (IMHO) the simplest solution for your problem.
I think so, but I don't know how to write simple kernel init code which support ELF.
Yet now I don't want to use Grub.
...
I decided to use GRUB...
Sorry about my english.
Host OS: Linux Debian
Kernel type: microkernel
Kernel format: now flat binary, in future ELF.
Post Reply