This is the mail archive of the gdb-patches@sources.redhat.com 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]

[patch] Get MI to work with embedded targets


Hello,

The attatched patch/hack gets the MI testsuite to work with embedded 
targets that don't support the extended-remote protocol and instead need 
to use ``jump *addr'' to start.

The hack is because it uses the CLI to achieve this.  As a consequence 
it gets an extra FAIL.

	Andrew
2001-08-18  Andrew Cagney  <ac131313@redhat.com>

	* lib/mi-support.exp (mi_gdb_start): If a remote target, use the
	CLI jump command to start it.
	(mi_run_to_main): Fail immediatly when unexpected output.

Index: lib/mi-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
retrieving revision 1.9
diff -p -r1.9 mi-support.exp
*** mi-support.exp	2001/08/18 21:34:28	1.9
--- mi-support.exp	2001/08/19 00:51:05
*************** proc mi_run_cmd {args} {
*** 590,595 ****
--- 590,607 ----
  	    }
  	    return;
  	}
+ 
+ 	if [target_info exists gdb,start_symbol] {
+ 	    set start [target_info gdb,start_symbol];
+ 	} else {
+ 	    set start "start";
+ 	}
+ 
+ 	# HACK: Should either use 000-jump or fix the target code
+ 	# to better handle RUN.
+ 	send_gdb  "jump *$start\n"
+ 	warning "Using CLI jump command, expect run-to-main FAIL"
+ 	return
      }
  
      send_gdb "000-exec-run $args\n"
*************** proc mi_run_to_main { } {
*** 636,641 ****
--- 648,656 ----
  	-re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"main\",args=\(\\\[\\\]\|\{\}\),file=\".*\",line=\"\[0-9\]*\"\}\r\n$mi_gdb_prompt$" {
  	    pass "$test"
  	    return 0
+ 	}
+ 	-re ".*$mi_gdb_prompt$" {
+ 	    fail "$test (2)"
  	}
  	timeout {
  	    fail "$test (timeout)"

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