This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: fix PR 15364
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 15 Apr 2013 11:22:28 +0200
- Subject: Re: RFC: fix PR 15364
- References: <87a9p3h958 dot fsf at fleche dot redhat dot com>
Tom Tromey <tromey@redhat.com> writes:
> My earlier fix for PR 9197 introduced a regression.
> You can see it clearly here:
>
> (gdb) p s2
> $1 = (struct s *) 0x0
> (gdb) p s2 && s2->x == 0
> Cannot access memory at address 0x0
>
> The exception in this case is thrown by binop_promote, but I think that
> a lot of code expects EVAL_AVOID_SIDE_EFFECTS to return a not_lval
> value, so I fixed the problem by changing the various spots I touched
> for 9197 to do this.
>
> Built and regtested on x86-64 Fedora 18.
> New test case included.
Since I've reported the bug on IRC, here's my confirmation that the fix
works and looks good to me. Tested on s390x.