This is the mail archive of the gdb@sourceware.org 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]

Re: Gdb


> Date: Wed, 25 Oct 2006 23:38:49 +1000
> From: Russell Shaw <rjshaw@netspace.net.au>
> CC:  gdb@sourceware.org
> 
> There are places with long sequences of:
> 
>    if() {
>      ...
>    }
> 
>    if() {
>      ...
>    }
> 
>    if() {
>      ...
>    }
> 
> Instead of something more rigorous like:
> 
>    if() {
>      ...
>    }
>    else if {
>      ...

These two are not the same.  If you can show us places where the
conditions are disjoint, i.e. they cannot happen together, please do.

> When a "run" resets a simple breakpoint, the stack depth is no less
> than 35 levels.

That is not necessarily a sign of bad design.  For example, when Emacs
does garbage collection, the stack depth sometimes exceeds 10,000
levels when recursive data structures are marked.  That is normal and
by design.

> It also invokes a tortuous 10-level trip thru various
> "memory set" functions until it eventually reaches target_xfer_partial or whatever,
> intermingled with re-reading symbol files, re-syncing dynamic libraries, and
> resetting breakpoints.

This multi-level trip is mostly for valid reasons.

> It's undoable by anyone not intimately familiar with the code which means
> weeks of prodding with a second gdb.

That is a wild exaggeration, IMO.  When I first came to hack GDB to
submit a patch, it was no harder than in any other real-life program.

Perhaps you lack good tools for learning programs, or don't use them
to their full power.


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