This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Add tests for JIT debugging interface
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Date: Wed, 12 Jan 2011 07:17:27 +0000
- Subject: Re: [patch] Add tests for JIT debugging interface
- References: <20110111232641.AE3D5190C55@elbrus2.mtv.corp.google.com>
On Tuesday 11 January 2011 23:26:41, Paul Pluzhnikov wrote:
> +int main(int argc, char *argv[])
> +{
> + if (argc < 2)
> + usage(argv[0]);
> + else
> + {
You're using GNU formatting throughout the file except here.
> +proc one_test {count match_str} {
> + global solib_binfile gdb_prompt
> +
> + gdb_test_no_output "set args $solib_binfile $count" "set args"
> + if ![runto_main] then {
> + fail "Can't run to main"
> + return 0
> + }
> +
> + gdb_breakpoint [gdb_get_line_number "break here 1"]
> + gdb_continue_to_breakpoint "break here 1"
> + gdb_test "info function jit_function" "$match_str"
> + gdb_breakpoint [gdb_get_line_number "break here 2"]
> + gdb_continue_to_breakpoint "break here 2"
> + # All jit librares must have been unregistered
> + gdb_test "info function jit_function" \
> + "All functions matching regular expression \"jit_function\":"
Tests should have distinct messages. Since this procedure
is ran more than once, you'll have identical output more than
once in your gdb.sum. I suggest making use of $pf_prefix (grep will
find uses).
This is okay with that, and Yao's comments addressed.
Thanks much!
> +}
> +
> +one_test 1 "${hex} jit_function_0000"
> +one_test 2 "${hex} jit_function_0000\[\r\n\]+${hex} jit_function_0001"
--
Pedro Alves