This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Insight 5.0 fails under Win98
- To: <Fano dot Ramparany at rd dot francetelecom dot fr>
- Subject: [ECOS] Re: Insight 5.0 fails under Win98
- From: "Siegfried Schaefer" <s dot schaefer at schaefer-edv dot de>
- Date: Sat, 18 Nov 2000 15:06:51 +0100
- Cc: <ecos-discuss at sources dot redhat dot com>
Hi,
i have a working distribution for the arm-tool-chain and insight 5.0 running
under Win98 and 95. I have derived it from the july sources of insight and
applied the two patches below manually because they don't run automatically.
I have also done a patch at the function find_iwidgets_library at util.tcl
from gdbtcl. Try to apply the changes and let me know if all works for you.
I also offer a cd-rom with this distribution. If you are interested in it -
let me know. I send this e-mail without an attachement - beware of the
viruses.
Ciao, Siegfried
gdbrdi-stop.patch :
diff -Naur insight-5.0/gdb/rdi-share/ardi.c
insight-5.0-mod/gdb/rdi-share/ardi.c
--- insight-5.0/gdb/rdi-share/ardi.c Mon Jan 17 18:54:36 2000
+++ insight-5.0-mod/gdb/rdi-share/ardi.c Thu Aug 24 13:09:01 2000
@@ -396,6 +396,7 @@
static bool boot_interrupted = FALSE;
static volatile bool interrupt_request = FALSE;
+static volatile bool stop_request = FALSE;
static void ardi_sigint_handler(int sig) {
#ifdef DEBUG
@@ -1343,10 +1344,16 @@
Packet *packet );
#endif
+void angel_RDI_stop_request(void)
+{
+ stop_request = 1;
+}
+
/* Core functionality for execute and step */
static int angel_RDI_ExecuteOrStep(PointHandle *handle, word type,
unsigned ninstr)
{
+ extern int (*ui_loop_hook) (int);
int err;
adp_stopped_struct stopped_info;
void* stateptr = (void *)&stopped_info;
@@ -1401,15 +1408,22 @@
angel_DebugPrint("Waiting for program to finish...\n");
#endif
+ interrupt_request = FALSE;
+ stop_request = FALSE;
+
signal(SIGINT, ardi_sigint_handler);
while( executing )
{
- if (interrupt_request)
+ if (ui_loop_hook)
+ ui_loop_hook(0);
+
+ if (interrupt_request || stop_request)
{
interrupt_target();
interrupt_request = FALSE;
+ stop_request = FALSE;
}
- Adp_AsynchronousProcessing( async_block_on_nothing );
+ Adp_AsynchronousProcessing( async_block_on_nothing );
}
signal(SIGINT, SIG_IGN);
diff -Naur insight-5.0/gdb/rdi-share/ardi.h
insight-5.0-mod/gdb/rdi-share/ardi.h
--- insight-5.0/gdb/rdi-share/ardi.h Thu Apr 15 20:34:27 1999
+++ insight-5.0-mod/gdb/rdi-share/ardi.h Thu Aug 24 12:47:30 2000
@@ -60,6 +60,8 @@
int angel_RDI_execute(PointHandle *handle);
+void angel_RDI_stop_request(void);
+
int angel_RDI_step(unsigned ninstr, PointHandle *handle);
int angel_RDI_info(unsigned type, ARMword *arg1, ARMword *arg2);
diff -Naur insight-5.0/gdb/remote-rdi.c insight-5.0-mod/gdb/remote-rdi.c
--- insight-5.0/gdb/remote-rdi.c Wed Mar 1 05:25:51 2000
+++ insight-5.0-mod/gdb/remote-rdi.c Fri Aug 25 10:44:03 2000
@@ -972,6 +972,12 @@
return TARGET_SIGNAL_UNKNOWN;
}
}
+
+static void arm_rdi_stop(void)
+{
+ angel_RDI_stop_request();
+}
+
/* Define the target operations structure. */
@@ -987,6 +993,7 @@
arm_rdi_ops.to_detach = arm_rdi_detach;
arm_rdi_ops.to_resume = arm_rdi_resume;
arm_rdi_ops.to_wait = arm_rdi_wait;
+ arm_rdi_ops.to_stop = arm_rdi_stop;
arm_rdi_ops.to_fetch_registers = arm_rdi_fetch_registers;
arm_rdi_ops.to_store_registers = arm_rdi_store_registers;
arm_rdi_ops.to_prepare_to_store = arm_rdi_prepare_to_store;
gdbtk-ignore-sigint.patch :
--- insight-5.0/gdb/gdbtk/library/interface.tcl Mon Mar 27 19:59:39 2000
+++ insight-5.0-mod/gdb/gdbtk/library/interface.tcl Thu Aug 24 14:21:30 2000
@@ -1423,13 +1423,15 @@
# --------------------------------------------------------------------------
---
proc gdbtk_signal {name {longname ""}} {
dbug W "caught signal $name $longname"
- set longname
- set message "Program received signal $name, $longname"
- set srcs [ManagedWin::find SrcWin]
- foreach w $srcs {
- $w set_status $message
+ if {$name != "SIGINT"} {
+ set longname
+ set message "Program received signal $name, $longname"
+ set srcs [ManagedWin::find SrcWin]
+ foreach w $srcs {
+ $w set_status $message
+ }
+ gdbtk_tcl_ignorable_warning signal $message
}
- gdbtk_tcl_ignorable_warning signal $message
update idletasks
}
gdbtk-sourcepath.patch :
--- insight-5.0/tcl/generic/tclFileName.c Mon Nov 8 19:28:43 1999
+++ insight-5.0-mod/tcl/generic/tclFileName.c Thu Aug 24 14:35:57 2000
@@ -920,6 +920,12 @@
* not even be initialized. */
{
register char *p;
+#ifdef __CYGWIN32__
+ char dos_name[PATH_MAX];
+
+ cygwin_conv_to_win32_path(name,dos_name);
+ name = dos_name;
+#endif
/*
* Handle tilde substitutions, if needed.
util-c-patch (just copy it into the file !) :
proc find_iwidgets_library {} {
set IwidgetsOK 1
if {[catch {package require Iwidgets 3.0} errMsg]} {
# OK, we are not installed or this would have succeeded...
# Lets try to do it by hand:
set IwidgetsOK 0
# set iwidgetsSrcDir [glob -nocomplain [file join \
# [file dirname [file dirname $::tcl_library]] \
# itcl iwidgets*]]
set iwidgetsSrcDir [glob -nocomplain [file join \
[file dirname $::tcl_library] \
iwidgets3.0.0]]
# Canonicalize the executable's directory name. It turns out that on
Solaris,
# info nameofexecutable returns /foo/bar/real_dir/./gdb when gdb is
launched from
# another gdb session, so we have to fix this up.
set exec_name [info nameofexecutable]
set curdir [pwd]
if {[string compare [file type $exec_name] "link"] == 0} {
set exec_name [file readlink $exec_name]
if {[string compare [file pathtype $exec_name] "relative"] == 0} {
set exec_name [file join [pwd] $exec_name]
}
}
cd [file dirname $exec_name]
set exec_name [pwd]
cd $curdir
# set iwidgetsBuildDir [glob -nocomplain [file join \
# [file dirname $exec_name] \
# itcl iwidgets*]]
set iwidgetsBuildDir [glob -nocomplain [file join \
[file dirname $::tcl_library] \
iwidgets3.0.0 scripts]]
if {[llength $iwidgetsSrcDir] == 1 && [llength $iwidgetsBuildDir] == 1}
{
# The lindex is necessary because the path may have spaces in it...
# set initFile [file join [lindex $iwidgetsBuildDir 0] \
# $::tcl_platform(platform) iwidgets.tcl]
set initFile [file join [lindex $iwidgetsSrcDir 0] \
iwidgets.tcl]
# set libDir [file join [lindex $iwidgetsSrcDir 0] generic]
set libDir [file join [lindex $iwidgetsSrcDir 0] scripts]
if {[file exists $initFile] && [file isdirectory $libDir]} {
if {![catch {source $initFile} err]} {
# Now fix up the stuff the Iwidgets init file got wrong...
set libPos [lsearch $::auto_path [file join $::iwidgets::library
scripts]]
if {$libPos >= 0} {
set auto_path [lreplace $::auto_path $libPos $libPos $libDir]
} else {
lappend ::auto_path $libDir
}
set ::iwidgets::library $libDir
set IwidgetsOK 1
} else {
append errMsg "\nError in iwidgets.tcl file: $err"
}
}
} else {
append errMsg "\nCould not find in-place versions of the Iwidgets
files\n"
append errMsg "Looked at: [file join [file dirname\
[file dirname $::tcl_library]] itcl iwidgets*]\n"
append errMsg "and: [file join [file dirname \
[info nameofexecutable]] itcl iwidgets*]\n"
}
}
return $IwidgetsOK
}