So that even people who don't read the FAQ get a gdb that's minimially usable.
Created attachment 108560 [details] [diff] [review]
gdbinit patch, v1
This is taken from the FAQ, but has modifications to the way set auto-solib-add
is used so that attach works better.
Did you know that with really recent snapshots of gdb that you don't need the
auto-solib-add hacks wrt performance? It still uses lots of memory, though.
disabling loading the libraries also makes one more step in telling newbies how
to get a stack, which is basically going to be
% mozilla -g -d gdb
(gdb) set auto-solib-add 1
loading libs individually is too complicated for newbies.
the real advantage is to users who do a lot of debugging, but (for me at least)
it's a lot faster to get mozilla to the point where it will crash (or I want to
debug) and then attach gdb. it still uses lots of memory (230MB) and isn't
useful for catching stuff during startup, but it's more than 2x faster.
Assigning bugs that I'm not actively working on back to nobody; use
SearchForThis as a search term if you want to delete all related bugmail at
Is there interest in this bug any more? I'm willing to create a new patch if there is.
I don't know, what would you put in there? I would be willing to bet there are some nice Archer-gdb scripts around these days...
and any other useful things that folks have.
I don't know much about Archer-gdb.
I think it would help drive down the barrier to entry for developmen, so I'd say it would be great to get a patch here and land it...
Created attachment 437095 [details] [diff] [review]
Here's an updated patch.
Created attachment 442948 [details] [diff] [review]
Add cjone's ptarray:
Comment on attachment 442948 [details] [diff] [review]
I defer to jimb.
Ehsan, if you could check that the .gdbinit here is up to date, I'll r+ it.
Created attachment 620513 [details] [diff] [review]
I've added a few other macros since I attached the patch here!
I also recommend this:
> call JS_PCToLineNumber(cx, script, regs.pc)
> printf "%s:%d\n", script.ptr->filename, $
(In reply to Josh Matthews [:jdm] (travelling until June 25th, not reading non-CCed bugmail) from comment #14)
> I also recommend this:
> >def jsinfo
> > call JS_PCToLineNumber(cx, script, regs.pc)
> > printf "%s:%d\n", script.ptr->filename, $
Let's land this first, I don't wanna stall this more than necessary. Once this is in the tree, everyone can add all sorts of macros. :-)