This is the mail archive of the gdb-patches@sources.redhat.com 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: [RFA] arm-tdep.c: deal with failed memory read


Andrew Cagney writes:
 > > The arm-tdep.c part is approved.
 > > 
 > > We desperatly need a better naming convention and clearer semantics (what happens if the function fails due to a target disconnect) for these wrapped functions.  gdb_*() is being used by both libgdb and wrapper.[hc] et.al.
 > 
 > Hmm, this doesn't read very well.  Lets try ...
 > 
 > gdb.h contains gdb_...() libgdb functions.
 > 
 > wrapper.h contains gdb_...() save functions.
 > 
 > Two very different interfaces with identical prefixes.  I think a 
 > separate naming convention needs to be adopted for save / wrapped / ... 
 > functions.  I also think the function semantics need to be more tightly 
 > defined.  For instance, a safe function should catch a bad memory read, 
 > should that safe function catch a failure because the target interface 
 > has gone down (tcp connection lost, ...) or because the user entered a 
 > cntrl-c.
 > 
 > Anyway, food for thought.
 > 
 > enjoy,
 > Andrew
 > 

I committed the patch and changed the name from gdb_read_memory_integer
to safe_read_memory_integer.

I haven't committed it to the 5.1 branch, should I?.

Elena


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