This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH][PR 18438] PyExc_MemoryError != gdbpy_gdb_memory_error
- From: Doug Evans <dje at google dot com>
- To: gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 26 May 2015 16:16:02 -0700
- Subject: Re: [PATCH][PR 18438] PyExc_MemoryError != gdbpy_gdb_memory_error
- Authentication-results: sourceware.org; auth=none
- References: <e89a8ffbacdfb7112205169d623e at google dot com>
On Thu, May 21, 2015 at 1:28 PM, Doug Evans <dje@google.com> wrote:
> Hi.
>
> This patch fixes pr 18438.
> The problem here is that the wrong exception is being thrown
> causing python backtraces to be printed when they shouldn't be.
>
> There's still an issue of whether the error text should change.
> The user may not know what a lazy string is (and shouldn't have to,
> s/he may be using some random pretty-printer).
> Left for a separate patch, pr 18445.
>
> Regression tested on amd64-linux.
>
> 2015-05-21 Doug Evans <dje@google.com>
>
> PR python/18438
> * python/py-lazy-string.c (stpy_convert_to_value): Use
> gdbpy_gdb_memory_error not PyExc_MemoryError.
> (gdbpy_create_lazy_string_object): Ditto.
>
> testsuite/
> * gdb.python/py-lazy-string.c: New file.
> * gdb.python/py-lazy-string.exp: New file.
> * gdb.python/py-prettyprint.c (lazystring) <len>: New member.
> (main): Update. Add estring3, estring4.
> * gdb.python/py-prettyprint.exp: Add tests for strings at address 0.
> * gdb.python/py-prettyprint.py (pp_ls): Handle length.
Committed.