adding support for gdb

adding support for gdb

Post by don.. » Thu, 30 Apr 1992 04:53:47

Does anyone know of any documents/manuals explaining how to add support
for gdb?  I'm writing the back end of a C compiler and will be spitting
code for Motorola 68040, sparc, MIPS R2000 and maybe ibm's RS/6000.

so far there's only the gdb manual that I glanced through, and of course
gcc -S -g

Any help is greatly appreciated.

please email any responses to:

I'll summarize if there's any interest.


[Most of the Unix symbol table formats are quite similar to each other.
You might find the O'Reilly COFF book to be of use.  But really, there's
no substitute here for reading the code. -John]

{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.


1. Interfacing with gdb: How to set a gdb watch point from C++ code?

I have the following code in a third party library:

// GeneralXEventHandler gets called for each event of the types we requested
// in RegisterObject().  We send the event to the Event() routine of the
// object the event belongs to.
void GeneralXEventHandler(Widget, XtPointer object, XEvent *xEvent,
Boolean *)
        UI_WINDOW_OBJECT *uObject = (UI_WINDOW_OBJECT *)object;
        // for debug
^^^^^^^^^^^^^^ need a watchpoint right after assignment.
        UI_WINDOW_OBJECT *uObjectDup = (UI_WINDOW_OBJECT *)object;
        if (!uObject->screenID)
        UI_EVENT event(E_MOTIF, *xEvent);
        if (xEvent->type == KeyPress && event.rawCode == XK_Tab)
                _lastFocusEvent = KeyPress;
        else if (xEvent->type == ButtonPress)
                _lastFocusEvent = ButtonPress;

        if(uObject != uObjectDup) {
                l_fatal("object %p objectdup %p !!!!", uObject, uObjectDup);

I want to set a watchpoint on the contents of uObject after
initialization. The function is called quite a bit and I don't want to
do it manually on every call.
Is there a gcc directive to automate this?

2. cron problem...

3. gdb problem (gdb 4.8, gcc 2.6.2)

4. Adding a string to multiple files by position?

5. please HELP with GDB output redirect to GDB variable !!!

6. NCSA Redirect for ~user?

7. binutils, bugs in gdb, & "fixes" to gdb

8. port forwarding

9. Thread support in gdb 5.0?

10. Thread support with gdb 5?

11. GDB Wiggler Support Yet?

12. HELP! GDB & pthread support

13. FYI: gdb-4.17 support for LinuxThread debugging