This is the mail archive of the gdb-patches@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: [RFC] varobj deletion after the binary has changed


 > > If there was a buggy memory access I presume it would manifest itself in
 > > the execution of GDB in some way.
 > 
 > No, that's a bad assumption to make about invalid memory access.  It's
 > often impossible to detect it without some luck or a tool like
 > valgrind.

It even identifies the variable object as int:

-var-info-type var1
^done,type="int"
(gdb)

which would seem a remarkable coincidence if it was looking at the wrong
address.  I'm not sure what happens on rereading, maybe space gets malloced
for the symbol table, freed and then malloced again.  Perhaps with FC5 it's
just fortunate that the symbol table is allocated exactly as before.  In any
case, it can segfault if you edit the source file and recompile before
(re)starting execution, so some change is necessary.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


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