This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: MI: Another -var-update bug? [PATCH]
- From: Vladimir Prus <ghost at cs dot msu dot su>
- To: Nick Roberts <nickrob at snap dot net dot nz>, gdb-patches at sources dot redhat dot com
- Date: Thu, 04 Jan 2007 21:48:21 +0300
- Subject: Re: MI: Another -var-update bug? [PATCH]
- References: <17790.36044.454650.114329@kahikatea.snap.net.nz> <17791.40309.90872.126841@kahikatea.snap.net.nz>
Nick Roberts wrote:
> Something like below?
This patch introduces this for me:
FAIL: gdb.mi/mi-var-cp.exp: update RX (3)
Do you get this failure to? If yes, can you please fix it?
If no, let me know and I'll investigate.
> /* FIXME: select_frame could fail */
> ! Â Â Â if (fi)
> ! ÂÂÂÂÂÂ{
> ! ÂÂÂÂÂÂ ÂCORE_ADDR pc = get_frame_pc (fi);
> ! ÂÂÂÂÂÂ Âif (pc < ÂBLOCK_START (var->root->valid_block) ||
> ! ÂÂÂÂÂÂ Â Â Âpc >= BLOCK_END (var->root->valid_block))
> ! ÂÂÂÂÂÂ Â Âwithin_scope = 0;
> ! ÂÂÂÂÂÂ Âselect_frame (fi);
> ! ÂÂÂÂÂÂ}
The code later in this function is only executed if "within_scope" is
true. Would it be better to call select_frame only if within_scope is
set to true, like this:
if (pc < BLOCK_START (var->root->valid_block) ||
pc >= BLOCK_END (var->root->valid_block))
within_scope = 0;
else
select_frame (fi);
?
- Volodya