This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Disassemble over end of line table sequence.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Andrew Burgess <aburgess at broadcom dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 31 Jan 2011 06:41:48 +0400
- Subject: Re: [PATCH] Disassemble over end of line table sequence.
- References: <4D08CF76.1000809@broadcom.com> <20110114160919.GP2504@adacore.com> <4D357E8D.3040304@broadcom.com>
> gdb/ChangeLog
>
> 2011-01-18 Andrew Burgess <aburgess@broadcom.com>
>
> * disasm.c (compare_lines): Handle the end of sequence markers
> within the line table to better support disassembling over
> compilation unit boundaries.
>
> gdb/testsuite/ChangeLog
>
> 2011-01-18 Andrew Burgess <aburgess@broadcom.com>
>
> * gdb.base/disasm-end-cu-1.c, gdb.base/disasm-end-cu-2.c,
> gdb.base/disasm-end-cu.exp: New test for disassembling over the
> boundary between two compilation units.
Sorry for the late review. For some reason, I completely missed this
email. Thanks for pinging.
I think we're almost there. The disasm.c change looks good to me.
But I still have a couple of requests for the testcase.
> + You should have received a copy of the GNU General Public License
> + along with this program. If not, see <http://www.gnu.org/licenses/>. */
> +
> +#include <stdio.h>
Can you make your testcase not depend on stdio.h? IO is not always
available, particularly on bareboard targets, so it'd be nice to be
able to build the example on these platforms too... This should be easily
doable by just having another unit that provides a function with the
same signature.
> +# This test tries to disassemble over the boundary between two compilation
> +# units displaying source lines. This checks that the disassemble routine
> +# can handle our use of line number 0 to mark the end of sequence.
Just a nit: missing second space after the period on the second line.
> +gdb_test_multiple "disassemble /m ${main_addr},${dummy_3_addr}" "Disassemble address range with source" {
[...]
> + timeout {
> + fail "(timeout) waiting for output of disassemble command"
The "timeout" branch is unnecessary (it's already handled by
gdb_test_multiple).
--
Joel