[PATCH] Fix gdb.mi/mi-file.exp for stubs.
Pedro Alves
pedro_alves@portugalmail.pt
Wed Dec 13 22:41:00 GMT 2006
Hi all,
There is a comment on mi-file.exp that says:
# get the path and absolute path to the current executable
#
# In gdb 6.2 (at least), the default line number is set by
# select_source_symtab to the first line of "main" minus
# the value of "lines_to_list" (which defaults to 10) plus one.
# --chastain 2004-08-13
That won't work for remote stubs.
The attached patch adds a call to mi_run_to_main with the following comment:
# When debugging a stub, we can't depend on the current file
# being the default file set by select_source_symtab.
# When the gdb host connects to the stub, the stub will already be
# running the target program stopped at a function
# that probably isn't the one with main. We force
# the file with main to be the current, so the following tests work.
Please review and commit.
Cheers,
Pedro Alves
---
2006-12-13 Pedro Alves <pedro_alves@portugalmail.pt>
* gdb.mi/mi-file.exp: Call mi_run_to_main if use_gdb_stub is set.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mi-file.exp.diff
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20061213/b99ad3d0/attachment.ksh>
More information about the Gdb-patches
mailing list