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: [PATCH][PR 18438] PyExc_MemoryError != gdbpy_gdb_memory_error


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.


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