This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Porting advice or documentation request


Hi all,

I'm working on this new gdb port, and more than often I'm stuck. I have been told that the d10v port is the most authorative template for how new targets should be written. Unfortunately it is impossible to learn anything about the d10v's hardware architecture on the net, so I find it a bit difficult to template from.

It is simple enough to copy the functions and such from the d10v's implemenation, but in many cases I have *no* idea what the function I'm implementing really does. E.g. what parts of the port are spesialised d10v parts and should not be copied, and which are general port implementations that should be copied, etc.

One pratical example is the struct frame_unwind table included in the target. It refers to "xxx_frame_this_id" and "xxx_frame_prev_register", which in turn performs some magic that I'm unable to make out. I understand from the docs that the xxx_frame_this_id should return the calling function's frame, but in the d10v port, there is much code that I dont understand what is.

And the list of gdbarch funtions are long, and my general impression is that I dont know which functions are required and which are there for special cases. What functions *must* I have implemented?

So please, please, please, does anyone have any pointers on how to understand gdb to get this port up and running? How can I best understand the gdbarch functions? I've read the gdb, gdb-internals manual and I'm grepping a lot of code, debugging gdb itself, but I'm still confused and uninformed. :(

So far I have at least a little bit. I have this TCP remote GDB server which talks to real hardware. And I've managed to get communication with it from GDB. I am able to place breakpoints, step code, etc. But as soon as I do anything more complex, like dumping the frame or printing the registers it either dies with a segfault or issues a gdb error. But again, generally I dont really know *why* things fail, because I dont understand *what* I need to do or *where* to put it.

... help please.


Regards, Svein


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]