* [rfc] Zap _WIN32 from main.c
@ 2001-05-04 10:38 Andrew Cagney
2001-05-04 14:58 ` Christopher Faylor
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cagney @ 2001-05-04 10:38 UTC (permalink / raw)
To: GDB Patches
Hello,
Per _WIN32 discussion, the attatched zapps the #ifndef _WIN32 from main.c.
Andrew
From fnasser@cygnus.com Fri May 04 13:28:00 2001
From: Fernando Nasser <fnasser@cygnus.com>
To: Michael Snyder <msnyder@cygnus.com>
Cc: gdb-patches@sources.redhat.com, fnasser@redhat.com
Subject: Re: [RFA] Error handling in gdb/testsuite/config/sid.exp
Date: Fri, 04 May 2001 13:28:00 -0000
Message-id: <3AF310F9.1BBA5CB@cygnus.com>
References: <200105032256.PAA00844@sloth.cygnus.com>
X-SW-Source: 2001-05/msg00047.html
Content-length: 3705
Michael Snyder wrote:
>
> These changes will handle some error conditions.
>
Thanks Michael.
> 2001-05-03 Michael Snyder <msnyder@redhat.com>
>
> * config/sid.exp (gdb_target_sid): Check for error messages.
> On error or timeout, don't make expect exit (which will terminate
> all subsequent tests); instead just make gdb exit.
> (gdb_load): Check for error messages. On error or timeout,
> return a negative value.
>
> *** sid.exp.mrg Thu May 3 15:49:44 2001
> --- sid.exp Thu May 3 15:49:02 2001
> *************** proc gdb_target_sid { } {
> *** 141,153 ****
> set timeout 60
> verbose "Timeout is now $timeout seconds" 2
> gdb_expect {
> -re "Remote debugging using.*$gdb_prompt" {
> verbose "Set target to sid"
> }
> timeout {
> perror "Couldn't set target for remote simulator."
> cleanup
> ! exit $exit_status
> }
> }
> set timeout $prev_timeout
> --- 141,158 ----
> set timeout 60
> verbose "Timeout is now $timeout seconds" 2
> gdb_expect {
> + -re ".*\[Ee\]rror.*$gdb_prompt $" {
> + perror "Couldn't set target for remote simulator."
> + cleanup
> + gdb_exit
> + }
> -re "Remote debugging using.*$gdb_prompt" {
> verbose "Set target to sid"
> }
> timeout {
> perror "Couldn't set target for remote simulator."
> cleanup
> ! gdb_exit
> }
> }
> set timeout $prev_timeout
> *************** proc gdb_load { arg } {
> *** 164,169 ****
> --- 169,175 ----
> global loadfile
> global GDB
> global gdb_prompt
> + global retval
>
> gdb_unload
> if [gdb_file_cmd $arg] then { return -1 }
> *************** proc gdb_load { arg } {
> *** 175,198 ****
> set timeout 2400
> verbose "Timeout is now $timeout seconds" 2
> gdb_expect {
> -re ".*$gdb_prompt $" {
> if $verbose>1 then {
> send_user "Loaded $arg into $GDB\n"
> }
> ! set timeout 30
> ! verbose "Timeout is now $timeout seconds" 2
> ! return 1
> }
> -re "$gdb_prompt $" {
> if $verbose>1 then {
> perror "GDB couldn't load."
> }
> }
> timeout {
> if $verbose>1 then {
> perror "Timed out trying to load $arg."
> }
> }
> }
> set timeout $prev_timeout
> }
> --- 181,212 ----
> set timeout 2400
> verbose "Timeout is now $timeout seconds" 2
> gdb_expect {
> + -re ".*\[Ee\]rror.*$gdb_prompt $" {
> + if $verbose>1 then {
> + perror "Error during download."
> + }
> + set retval -1;
> + }
> -re ".*$gdb_prompt $" {
> if $verbose>1 then {
> send_user "Loaded $arg into $GDB\n"
> }
> ! set retval 1;
> }
> -re "$gdb_prompt $" {
> if $verbose>1 then {
> perror "GDB couldn't load."
> }
> + set retval -1;
> }
> timeout {
> if $verbose>1 then {
> perror "Timed out trying to load $arg."
> }
> + set retval -1;
> }
> }
> set timeout $prev_timeout
> + verbose "Timeout is now $timeout seconds" 2
> + return $retval;
> }
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [rfc] Zap _WIN32 from main.c
2001-05-04 10:38 [rfc] Zap _WIN32 from main.c Andrew Cagney
@ 2001-05-04 14:58 ` Christopher Faylor
0 siblings, 0 replies; 2+ messages in thread
From: Christopher Faylor @ 2001-05-04 14:58 UTC (permalink / raw)
To: GDB Patches
Dunno if you need my approval for this, since it's under a _WIN32 conditional,
but you've got it.
cgf
On Fri, May 04, 2001 at 01:38:27PM -0400, Andrew Cagney wrote:
>Hello,
>
>Per _WIN32 discussion, the attatched zapps the #ifndef _WIN32 from main.c.
>
> Andrew
>2001-05-04 Andrew Cagney <ac131313@redhat.com>
>
> * main.c (captured_main): Delete #ifndef _WIN32 conditional for
> WinGDB.
>
>Index: main.c
>===================================================================
>RCS file: /cvs/src/src/gdb/main.c,v
>retrieving revision 1.9
>diff -p -r1.9 main.c
>*** main.c 2001/04/05 02:02:13 1.9
>--- main.c 2001/05/04 16:56:39
>*************** extern int gdbtk_test (char *);
>*** 706,718 ****
> #endif
> }
>
>- /* The default command loop.
>- The WIN32 Gui calls this main to set up gdb's state, and
>- has its own command loop. */
>- #if !defined _WIN32 || defined __GNUC__
>- /* GUIs generally have their own command loop, mainloop, or
>- whatever. This is a good place to gain control because many
>- error conditions will end up here via longjmp(). */
> #if 0
> /* FIXME: cagney/1999-11-06: The original main loop was like: */
> while (1)
>--- 706,711 ----
>*************** extern int gdbtk_test (char *);
>*** 748,754 ****
> {
> catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL);
> }
>- #endif
> /* No exit -- exit is through quit_command. */
> }
>
>--- 741,746 ----
--
cgf@cygnus.com Red Hat, Inc.
http://sources.redhat.com/ http://www.redhat.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-05-04 14:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-04 10:38 [rfc] Zap _WIN32 from main.c Andrew Cagney
2001-05-04 14:58 ` Christopher Faylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox