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] btrace, vdso: add vdso target sections


Hi Markus,

Sorry for the delay...

Looks largely fine, but ...

On 04/04/2014 09:53 AM, Markus Metzger wrote:

> @@ -131,6 +133,27 @@ symbol_file_add_from_memory (struct bfd *templ, CORE_ADDR addr,
>  				   from_tty ? SYMFILE_VERBOSE : 0,
>                                     sai, OBJF_SHARED, NULL);
>  
> +  if (add_sections)
> +    {
...

Why is this conditional?  Why not add the sections if the symbols are
added manually with add-symbol-file-from-memory?  The use case for the
command was originally exactly to add the vdso's symbols to GDB.

> +	}
> +    }
> +
>    /* This might change our ideas about frames already looked at.  */
>    reinit_frame_cache ();
>  
> @@ -159,7 +182,7 @@ add_symbol_file_from_memory_command (char *args, int from_tty)
>      error (_("Must use symbol-file or exec-file "
>  	     "before add-symbol-file-from-memory."));
>  
> -  symbol_file_add_from_memory (templ, addr, 0, NULL, from_tty);
> +  symbol_file_add_from_memory (templ, addr, 0, NULL, 0, from_tty);



> +# trace the test code
> +gdb_test_no_output "record btrace"
> +gdb_test "next"

Please add a pattern that makes sure the "next" actually
finished successfully.

> +
> +# start replaying
> +gdb_test "reverse-stepi"

Likewise.

> +
> +# disassemble the code around the current PC
> +gdb_test "disassemble \$pc, +10" [join [list \
> +	".*" \
> +	"End of assembler dump\." \
> +    ] "\r\n"]

What is the error one gets without the fix?  Doesn't
GDB say "End of assembler dump" in that case too?

-- 
Pedro Alves


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