[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Modified gdb for Lout
From: |
Salman Khilji |
Subject: |
Modified gdb for Lout |
Date: |
Sat, 26 Jul 2003 22:35:04 -0700 |
User-agent: |
KMail/1.5.1 |
One of the things that is making it really hard for me to see the internals of
lout OBJECTs in DDD is that these objects are too big to fit nicely in DDD
windows. Even if you want to look at succ and pred for PARENT and CHILD
directions, you really have to expand all the unions really deep. This
situation arises simply because lout uses a "one size fits all" approach for
the basic data type.
I modified gdb version 5.3 on Linux and taught it about Lout types. I can now
visually see the Lout types in DDD much more clearly. Basically gdb shows
only the variables in the structure that are of interest depending on the
type of the variable. So, for example, gdb fools the user into thinking that
the actual OBJECT when its of type LINK is:
struct tGAP_OBJ_ {
OBJECT _predPARENT_;
OBJECT _succPARENT_;
enum tLTYPE _type_;
int _rec_size_;
GAP _gap_;
int _underline_;
OBJECT _predCHILD_;
OBJECT _succCHILD_;
};
Simarly when the actual object is EXT_GALL, then gdb shows only the following
fields:
struct tEXT_GALL_ {
OBJECT _predPARENT_;
OBJECT _succPARENT_;
enum tLTYPE _type_;
int _rec_size_;
int _eg_fnum_;
int _eg_fpos_;
int _eg_lnum_;
int _eg_cont_;
OBJECT _eg_symbol_;
OBJECT _predCHILD_;
OBJECT _succCHILD_;
};
And So forth. I am aware of the built-in debug functionality and lout but if
you are like me who gets spoiled by modern beasts known as debuggers, then
simply "printf" style debugging is simply not enough. One of the things that
I tried to do was to call the function from gdb
call EchoObject <object of interest>
But gdb version 5.3 makes the target crash so often when you do this.
Will someone be interested in my patches for gdb? The main purpose is for
others to see it and probably modify my patches to make it useful to do
normal modern type of debugging instead of printf style debugging.
Salman
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Modified gdb for Lout,
Salman Khilji <=