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] expose gdb values to python


On Thu, Sep 25, 2008 at 10:59:26PM -0300, Thiago Jung Bauermann wrote:
> This version has no FIXMEs. It uses current_language for value printing, and
> its length operation always fails with NotImplemented. Ok to commit?

Once Eli is happy with the documentation this is OK.

Two coding notes:

> +      PyErr_SetString (PyExc_MemoryError, _("Could not allocate memory to " \
> +					    "create Value object."));

No need for the backslash here.

> +  gdb_test_multiple "python argv = gdb.get_value_from_history (0)" "" {
> +      -re "Traceback.*$gdb_prompt $"  {fail "get value from history"}
> +      -re "$gdb_prompt $"	      {}
> +  }

You really want a helper function for tests expected not to produce
output, they're the bulk of this file.  Another way to do it is by
matching the command as it is sent; that's how the MI tests work.
I think there's some non-MI examples too but I'm not sure where.

-- 
Daniel Jacobowitz
CodeSourcery


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