* [RFA?] Windows cleanup
@ 2001-05-30 20:22 Christopher Faylor
2001-05-31 7:29 ` Eli Zaretskii
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Christopher Faylor @ 2001-05-30 20:22 UTC (permalink / raw)
To: gdb-patches
I should probably submit these as two patches. One part cleans up some
cygwin ifdefs, the other eliminates _MSC_VER tests.
I think that all of these qualify as obvious fixes, given that I'm the
Cygwin maintainer and _MSC_VER is no longer supported, however, I'd
like someone to verify that I properly whacked the ifdefs since I can't
really test things like "nindy-share".
Thanks to Eli for pointing all of this out a while ago. I love
eliminating obsolete stuff.
cgf
Wed May 30 23:02:44 2001 Christopher Faylor <cgf@cygnus.com>
* gnu-regex.c: Eliminate obsolete check for _MSC_VER.
* utils.c (quit): Ditto.
* values.c (unpack_double): Ditto.
* defs.h: Ditto.
* m32-rom.c: Ditto.
* p-exp.y: Ditto.
* ser-e7kpc.c: Ditto. Define WIN32_LEAN_AND_MEAN under _WIN32, for
faster compilation.
(get_ds_base): Remove _MSC_VER version of this function.
* utils.c (notice_quit): Ditto.
* values.c (unpack_double): Remove obsolete check for _MSC_VER.
* nindy-share/ttyflush.c: Ditto.
* rdi-share/host.h: Ditto.
* main.c (captured_main): Eliminate special Cygwin checks.
* ser-tcp.c: Remove unneeded __CYGWIN__ guard against system include.
Index: gnu-regex.c
===================================================================
RCS file: /cvs/uberbaum/gdb/gnu-regex.c,v
retrieving revision 1.5
diff -c -2 -0 -p -r1.5 gnu-regex.c
*** gnu-regex.c 2001/03/06 08:21:07 1.5
--- gnu-regex.c 2001/05/30 21:34:57
*************** static reg_errcode_t compile_range _RE_A
*** 1573,1627 ****
relative address offset by the three bytes the jump itself occupies. */
#define STORE_JUMP(op, loc, to) \
store_op1 (op, loc, (int) ((to) - (loc) - 3))
/* Likewise, for a two-argument jump. */
#define STORE_JUMP2(op, loc, to, arg) \
store_op2 (op, loc, (int) ((to) - (loc) - 3), arg)
/* Like `STORE_JUMP', but for inserting. Assume `b' is the buffer end. */
#define INSERT_JUMP(op, loc, to) \
insert_op1 (op, loc, (int) ((to) - (loc) - 3), b)
/* Like `STORE_JUMP2', but for inserting. Assume `b' is the buffer end. */
#define INSERT_JUMP2(op, loc, to, arg) \
insert_op2 (op, loc, (int) ((to) - (loc) - 3), arg, b)
/* This is not an arbitrary limit: the arguments which represent offsets
into the pattern are two bytes long. So if 2^16 bytes turns out to
be too small, many things would have to change. */
! /* Any other compiler which, like MSC, has allocation limit below 2^16
! bytes will have to use approach similar to what was done below for
! MSC and drop MAX_BUF_SIZE a bit. Otherwise you may end up
! reallocating to 0 bytes. Such thing is not going to work too well.
! You have been warned!! */
! #if defined _MSC_VER && !defined WIN32
! /* Microsoft C 16-bit versions limit malloc to approx 65512 bytes.
! The REALLOC define eliminates a flurry of conversion warnings,
! but is not required. */
! # define MAX_BUF_SIZE 65500L
! # define REALLOC(p,s) realloc ((p), (size_t) (s))
! #else
! # define MAX_BUF_SIZE (1L << 16)
! # define REALLOC(p,s) realloc ((p), (s))
! #endif
/* Extend the buffer by twice its current size via realloc and
reset the pointers that pointed into the old block to point to the
correct places in the new one. If extending the buffer results in it
being larger than MAX_BUF_SIZE, then flag memory exhausted. */
#define EXTEND_BUFFER() \
do { \
unsigned char *old_buffer = bufp->buffer; \
if (bufp->allocated == MAX_BUF_SIZE) \
return REG_ESIZE; \
bufp->allocated <<= 1; \
if (bufp->allocated > MAX_BUF_SIZE) \
bufp->allocated = MAX_BUF_SIZE; \
bufp->buffer = (unsigned char *) REALLOC (bufp->buffer, bufp->allocated);\
if (bufp->buffer == NULL) \
return REG_ESPACE; \
/* If the buffer moved, move all the pointers into it. */ \
if (old_buffer != bufp->buffer) \
{ \
b = (b - old_buffer) + bufp->buffer; \
--- 1573,1614 ----
relative address offset by the three bytes the jump itself occupies. */
#define STORE_JUMP(op, loc, to) \
store_op1 (op, loc, (int) ((to) - (loc) - 3))
/* Likewise, for a two-argument jump. */
#define STORE_JUMP2(op, loc, to, arg) \
store_op2 (op, loc, (int) ((to) - (loc) - 3), arg)
/* Like `STORE_JUMP', but for inserting. Assume `b' is the buffer end. */
#define INSERT_JUMP(op, loc, to) \
insert_op1 (op, loc, (int) ((to) - (loc) - 3), b)
/* Like `STORE_JUMP2', but for inserting. Assume `b' is the buffer end. */
#define INSERT_JUMP2(op, loc, to, arg) \
insert_op2 (op, loc, (int) ((to) - (loc) - 3), arg, b)
/* This is not an arbitrary limit: the arguments which represent offsets
into the pattern are two bytes long. So if 2^16 bytes turns out to
be too small, many things would have to change. */
! #define MAX_BUF_SIZE (1L << 16)
! #define REALLOC(p,s) realloc ((p), (s))
/* Extend the buffer by twice its current size via realloc and
reset the pointers that pointed into the old block to point to the
correct places in the new one. If extending the buffer results in it
being larger than MAX_BUF_SIZE, then flag memory exhausted. */
#define EXTEND_BUFFER() \
do { \
unsigned char *old_buffer = bufp->buffer; \
if (bufp->allocated == MAX_BUF_SIZE) \
return REG_ESIZE; \
bufp->allocated <<= 1; \
if (bufp->allocated > MAX_BUF_SIZE) \
bufp->allocated = MAX_BUF_SIZE; \
bufp->buffer = (unsigned char *) REALLOC (bufp->buffer, bufp->allocated);\
if (bufp->buffer == NULL) \
return REG_ESPACE; \
/* If the buffer moved, move all the pointers into it. */ \
if (old_buffer != bufp->buffer) \
{ \
b = (b - old_buffer) + bufp->buffer; \
Index: main.c
===================================================================
RCS file: /cvs/uberbaum/gdb/main.c,v
retrieving revision 1.10
diff -c -2 -0 -p -r1.10 main.c
*** main.c 2001/05/07 19:03:11 1.10
--- main.c 2001/05/30 21:34:58
*************** int dbx_commands = 0;
*** 73,116 ****
struct ui_file *gdb_stdout;
struct ui_file *gdb_stderr;
struct ui_file *gdb_stdlog;
struct ui_file *gdb_stdtarg;
/* Used to initialize error() - defined in utils.c */
extern void error_init (void);
/* Whether to enable writing into executable and core files */
extern int write_files;
static void print_gdb_help (struct ui_file *);
/* These two are used to set the external editor commands when gdb is farming
out files to be edited by another program. */
extern int enable_external_editor;
extern char *external_editor_command;
- #ifdef __CYGWIN__
- #include <sys/cygwin.h> /* for cygwin32_conv_to_posix_path */
- #endif
-
/* Call command_loop. If it happens to return, pass that through as a
non-zero return status. */
static int
captured_command_loop (void *data)
{
if (command_loop_hook == NULL)
command_loop ();
else
command_loop_hook ();
/* FIXME: cagney/1999-11-05: A correct command_loop() implementaton
would clean things up (restoring the cleanup chain) to the state
they were just prior to the call. Technically, this means that
the do_cleanups() below is redundant. Unfortunately, many FUNCs
are not that well behaved. do_cleanups should either be replaced
with a do_cleanups call (to cover the problem) or an assertion
check to detect bad FUNCs code. */
do_cleanups (ALL_CLEANUPS);
/* If the command_loop returned, normally (rather than threw an
error) we try to quit. If the quit is aborted, catch_errors()
--- 73,112 ----
*************** extern int gdbtk_test (char *);
*** 517,571 ****
{
/* Print all the junk at the top, with trailing "..." if we are about
to read a symbol file (possibly slowly). */
print_gdb_version (gdb_stdout);
if (symarg)
printf_filtered ("..");
wrap_here ("");
gdb_flush (gdb_stdout); /* Force to screen during slow operations */
}
error_pre_print = "\n\n";
quit_pre_print = error_pre_print;
/* We may get more than one warning, don't double space all of them... */
warning_pre_print = "\nwarning: ";
/* Read and execute $HOME/.gdbinit file, if it exists. This is done
*before* all the command line arguments are processed; it sets
global parameters, which are independent of what file you are
debugging or what directory you are in. */
- #ifdef __CYGWIN__
- {
- char *tmp = getenv ("HOME");
-
- if (tmp != NULL)
- {
- homedir = (char *) alloca (PATH_MAX + 1);
- cygwin32_conv_to_posix_path (tmp, homedir);
- }
- else
- homedir = NULL;
- }
- #else
homedir = getenv ("HOME");
- #endif
if (homedir)
{
homeinit = (char *) alloca (strlen (homedir) +
strlen (gdbinit) + 10);
strcpy (homeinit, homedir);
strcat (homeinit, "/");
strcat (homeinit, gdbinit);
if (!inhibit_gdbinit)
{
catch_command_errors (source_command, homeinit, 0, RETURN_MASK_ALL);
}
/* Do stats; no need to do them elsewhere since we'll only
need them if homedir is set. Make sure that they are
zero in case one of them fails (this guarantees that they
won't match if either exists). */
memset (&homebuf, 0, sizeof (struct stat));
memset (&cwdbuf, 0, sizeof (struct stat));
--- 513,553 ----
Index: partial-stab.h
===================================================================
RCS file: /cvs/uberbaum/gdb/partial-stab.h,v
retrieving revision 1.7
diff -c -2 -0 -p -r1.7 partial-stab.h
*** partial-stab.h 2001/03/06 08:21:11 1.7
--- partial-stab.h 2001/05/30 21:34:59
*************** switch (CUR_SYMBOL_TYPE)
*** 583,626 ****
#ifdef SOFUN_ADDRESS_MAYBE_MISSING
/* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
value for the bottom of the text seg in those cases. */
if (pst && textlow_not_set)
{
pst->textlow =
find_stab_function_addr (namestring, pst->filename, objfile);
textlow_not_set = 0;
}
#endif
/* End kludge. */
/* Keep track of the start of the last function so we
can handle end of function symbols. */
last_function_start = CUR_SYMBOL_VALUE;
/* In reordered executables this function may lie outside
the bounds created by N_SO symbols. If that's the case
use the address of this function as the low bound for
the partial symbol table. */
! if (textlow_not_set
! || (pst && CUR_SYMBOL_VALUE < pst->textlow
! && CUR_SYMBOL_VALUE
! != ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile))))
{
pst->textlow = CUR_SYMBOL_VALUE;
textlow_not_set = 0;
}
#endif /* DBXREAD_ONLY */
add_psymbol_to_list (namestring, p - namestring,
VAR_NAMESPACE, LOC_BLOCK,
&objfile->static_psymbols,
0, CUR_SYMBOL_VALUE,
psymtab_language, objfile);
continue;
/* Global functions were ignored here, but now they
are put into the global psymtab like one would expect.
They're also in the minimal symbol table. */
case 'F':
CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
#ifdef DBXREAD_ONLY
/* Kludges for ELF/STABS with Sun ACC */
last_function_name = namestring;
--- 583,627 ----
#ifdef SOFUN_ADDRESS_MAYBE_MISSING
/* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
value for the bottom of the text seg in those cases. */
if (pst && textlow_not_set)
{
pst->textlow =
find_stab_function_addr (namestring, pst->filename, objfile);
textlow_not_set = 0;
}
#endif
/* End kludge. */
/* Keep track of the start of the last function so we
can handle end of function symbols. */
last_function_start = CUR_SYMBOL_VALUE;
/* In reordered executables this function may lie outside
the bounds created by N_SO symbols. If that's the case
use the address of this function as the low bound for
the partial symbol table. */
! if (pst
! && (textlow_not_set
! || (pst && CUR_SYMBOL_VALUE < pst->textlow
! && CUR_SYMBOL_VALUE
! != ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)))))
{
pst->textlow = CUR_SYMBOL_VALUE;
textlow_not_set = 0;
}
#endif /* DBXREAD_ONLY */
add_psymbol_to_list (namestring, p - namestring,
VAR_NAMESPACE, LOC_BLOCK,
&objfile->static_psymbols,
0, CUR_SYMBOL_VALUE,
psymtab_language, objfile);
continue;
/* Global functions were ignored here, but now they
are put into the global psymtab like one would expect.
They're also in the minimal symbol table. */
case 'F':
CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
#ifdef DBXREAD_ONLY
/* Kludges for ELF/STABS with Sun ACC */
last_function_name = namestring;
Index: ser-tcp.c
===================================================================
RCS file: /cvs/uberbaum/gdb/ser-tcp.c,v
retrieving revision 1.4
diff -c -2 -0 -p -r1.4 ser-tcp.c
*** ser-tcp.c 2001/04/05 02:02:13 1.4
--- ser-tcp.c 2001/05/30 21:34:59
***************
*** 12,54 ****
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "serial.h"
#include "ser-unix.h"
#include <sys/types.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/socket.h>
- #ifndef __CYGWIN__
- #include <netinet/tcp.h>
- #endif
#include <signal.h>
#include "gdb_string.h"
static int tcp_open (serial_t scb, const char *name);
static void tcp_close (serial_t scb);
void _initialize_ser_tcp (void);
/* Open up a raw tcp socket */
static int
tcp_open (serial_t scb, const char *name)
{
char *port_str;
int port;
struct hostent *hostent;
struct sockaddr_in sockaddr;
int tmp;
char hostname[100];
--- 12,51 ----
Index: utils.c
===================================================================
RCS file: /cvs/uberbaum/gdb/utils.c,v
retrieving revision 1.40
diff -c -2 -0 -p -r1.40 utils.c
*** utils.c 2001/04/19 23:56:13 1.40
--- utils.c 2001/05/30 21:35:01
*************** quit (void)
*** 851,918 ****
if (quit_pre_print)
fprintf_unfiltered (gdb_stderr, quit_pre_print);
#ifdef __MSDOS__
/* No steenking SIGINT will ever be coming our way when the
program is resumed. Don't lie. */
fprintf_unfiltered (gdb_stderr, "Quit\n");
#else
if (job_control
/* If there is no terminal switching for this target, then we can't
possibly get screwed by the lack of job control. */
|| current_target.to_terminal_ours == NULL)
fprintf_unfiltered (gdb_stderr, "Quit\n");
else
fprintf_unfiltered (gdb_stderr,
"Quit (expect signal SIGINT when the program is resumed)\n");
#endif
return_to_top_level (RETURN_QUIT);
}
-
- #if defined(_MSC_VER) /* should test for wingdb instead? */
-
- /*
- * Windows translates all keyboard and mouse events
- * into a message which is appended to the message
- * queue for the process.
- */
-
void
notice_quit (void)
{
- int k = win32pollquit ();
- if (k == 1)
- quit_flag = 1;
- else if (k == 2)
- immediate_quit = 1;
- }
-
- #else /* !defined(_MSC_VER) */
-
- void
- notice_quit (void)
- {
/* Done by signals */
}
-
- #endif /* !defined(_MSC_VER) */
/* Control C comes here */
void
request_quit (int signo)
{
quit_flag = 1;
/* Restore the signal handler. Harmless with BSD-style signals, needed
for System V-style signals. So just always do it, rather than worrying
about USG defines and stuff like that. */
signal (signo, request_quit);
#ifdef REQUEST_QUIT
REQUEST_QUIT;
#else
if (immediate_quit)
quit ();
#endif
}
\f
/* Memory management stuff (malloc friends). */
--- 851,895 ----
Index: values.c
===================================================================
RCS file: /cvs/uberbaum/gdb/values.c,v
retrieving revision 1.17
diff -c -2 -0 -p -r1.17 values.c
*** values.c 2001/05/21 20:08:59 1.17
--- values.c 2001/05/30 21:35:03
*************** unpack_double (struct type *type, char *
*** 678,723 ****
*invp = 0; /* Assume valid. */
CHECK_TYPEDEF (type);
code = TYPE_CODE (type);
len = TYPE_LENGTH (type);
nosign = TYPE_UNSIGNED (type);
if (code == TYPE_CODE_FLT)
{
#ifdef INVALID_FLOAT
if (INVALID_FLOAT (valaddr, len))
{
*invp = 1;
return 1.234567891011121314;
}
#endif
return extract_floating (valaddr, len);
}
else if (nosign)
{
/* Unsigned -- be sure we compensate for signed LONGEST. */
- #if !defined (_MSC_VER) || (_MSC_VER > 900)
return (ULONGEST) unpack_long (type, valaddr);
- #else
- /* FIXME!!! msvc22 doesn't support unsigned __int64 -> double */
- return (LONGEST) unpack_long (type, valaddr);
- #endif /* _MSC_VER */
}
else
{
/* Signed -- we are OK with unpack_long. */
return unpack_long (type, valaddr);
}
}
/* Unpack raw data (copied from debugee, target byte order) at VALADDR
as a CORE_ADDR, assuming the raw data is described by type TYPE.
We don't assume any alignment for the raw data. Return value is in
host byte order.
If you want functions and arrays to be coerced to pointers, and
references to be dereferenced, call value_as_pointer() instead.
C++: It is assumed that the front-end has taken care of
all matters concerning pointers to members. A pointer
to member which reaches here is considered to be equivalent
to an INT (or some size). After all, it is only an offset. */
--- 678,718 ----
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA?] Windows cleanup
2001-05-30 20:22 [RFA?] Windows cleanup Christopher Faylor
@ 2001-05-31 7:29 ` Eli Zaretskii
2001-05-31 16:40 ` Christopher Faylor
2001-06-06 5:12 ` Andrew Cagney
2001-06-06 10:29 ` Elena Zannoni
2 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2001-05-31 7:29 UTC (permalink / raw)
To: Christopher Faylor; +Cc: gdb-patches
On Wed, 30 May 2001, Christopher Faylor wrote:
> I think that all of these qualify as obvious fixes, given that I'm the
> Cygwin maintainer and _MSC_VER is no longer supported, however, I'd
> like someone to verify that I properly whacked the ifdefs since I can't
> really test things like "nindy-share".
The changes look good to me, except that:
> * utils.c (quit): Ditto.
This patch is not in what you posted.
> * defs.h: Ditto.
This one is also omitted.
> * m32-rom.c: Ditto.
> * p-exp.y: Ditto.
> * ser-e7kpc.c: Ditto. Define WIN32_LEAN_AND_MEAN under _WIN32, for
> faster compilation.
> (get_ds_base): Remove _MSC_VER version of this function.
And these.
> * nindy-share/ttyflush.c: Ditto.
> * rdi-share/host.h: Ditto.
Ditto.
> Index: partial-stab.h
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/partial-stab.h,v
> retrieving revision 1.7
> diff -c -2 -0 -p -r1.7 partial-stab.h
> *** partial-stab.h 2001/03/06 08:21:11 1.7
> --- partial-stab.h 2001/05/30 21:34:59
> *************** switch (CUR_SYMBOL_TYPE)
> *** 583,626 ****
This patch is not relevant to _MSCVER or __CYGWIN__.
> -
> - #if defined(_MSC_VER) /* should test for wingdb instead? */
> -
> - /*
> - * Windows translates all keyboard and mouse events
> - * into a message which is appended to the message
> - * queue for the process.
> - */
> -
> void
> notice_quit (void)
> {
> - int k = win32pollquit ();
> - if (k == 1)
> - quit_flag = 1;
> - else if (k == 2)
> - immediate_quit = 1;
> - }
> -
> - #else /* !defined(_MSC_VER) */
> -
> - void
> - notice_quit (void)
> - {
> /* Done by signals */
> }
> -
> - #endif /* !defined(_MSC_VER) */
With this patch (for utils.c), notice_quit becomes an empty function and
so it should probably be nuked altogether.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA?] Windows cleanup
2001-05-31 7:29 ` Eli Zaretskii
@ 2001-05-31 16:40 ` Christopher Faylor
2001-05-31 19:29 ` Fernando Nasser
2001-05-31 22:42 ` Eli Zaretskii
0 siblings, 2 replies; 10+ messages in thread
From: Christopher Faylor @ 2001-05-31 16:40 UTC (permalink / raw)
To: gdb-patches
On Thu, May 31, 2001 at 05:30:55PM +0300, Eli Zaretskii wrote:
>On Wed, 30 May 2001, Christopher Faylor wrote:
>>I think that all of these qualify as obvious fixes, given that I'm the
>>Cygwin maintainer and _MSC_VER is no longer supported, however, I'd
>>like someone to verify that I properly whacked the ifdefs since I can't
>>really test things like "nindy-share".
>
>The changes look good to me, except that:
Doh. I somehow really botched that patch. I wish I hadn't restarted my
X session so I could track down how I did that.
Anyway, this one should be a little better. I've addressed Eli's concerns,
I think.
Thanks to Eli and Fernando for checking this out for me and catching my
patch gaffe.
cgf
Wed May 30 23:02:44 2001 Christopher Faylor <cgf@cygnus.com>
* gnu-regex.c: Eliminate obsolete check for _MSC_VER.
* utils.c (notice_quit): Remove dummy function only used for _MSC_VER.
* values.c (unpack_double): Remove obsolete check for _MSC_VER.
* defs.h: Ditto.
* m32r-rom.c: Ditto.
* p-exp.y: Ditto.
* ser-e7kpc.c: Ditto. Define WIN32_LEAN_AND_MEAN under _WIN32, for
faster compilation.
(get_ds_base): Remove _MSC_VER version of this function.
* nindy-share/ttyflush.c: Ditto. X
* rdi-share/host.h: Ditto. X
* main.c (captured_main): Eliminate special Cygwin checks.
* ser-tcp.c: Remove unneeded __CYGWIN__ guard against system include.
Index: defs.h
===================================================================
RCS file: /cvs/uberbaum/gdb/defs.h,v
retrieving revision 1.50
diff -p -r1.50 defs.h
*** defs.h 2001/05/15 00:03:36 1.50
--- defs.h 2001/05/31 23:30:49
*************** typedef struct ptid ptid_t;
*** 920,932 ****
#include "fopen-same.h"
#endif
- /* Microsoft C can't deal with const pointers */
-
- #ifdef _MSC_VER
- #define CONST_PTR
- #else
#define CONST_PTR const
- #endif
/* Defaults for system-wide constants (if not defined by xm.h, we fake it).
FIXME: Assumes 2's complement arithmetic */
--- 920,926 ----
*************** extern char *getenv (const char *);
*** 1092,1102 ****
#endif
#ifdef HAVE_STDLIB_H
- #if defined(_MSC_VER) && !defined(__cplusplus)
- /* msvc defines these in stdlib.h for c code */
- #undef min
- #undef max
- #endif
#include <stdlib.h>
#endif
#ifndef min
--- 1086,1091 ----
Index: gnu-regex.c
===================================================================
RCS file: /cvs/uberbaum/gdb/gnu-regex.c,v
retrieving revision 1.5
diff -p -r1.5 gnu-regex.c
*** gnu-regex.c 2001/03/06 08:21:07 1.5
--- gnu-regex.c 2001/05/31 23:30:50
*************** static reg_errcode_t compile_range _RE_A
*** 1590,1610 ****
/* This is not an arbitrary limit: the arguments which represent offsets
into the pattern are two bytes long. So if 2^16 bytes turns out to
be too small, many things would have to change. */
! /* Any other compiler which, like MSC, has allocation limit below 2^16
! bytes will have to use approach similar to what was done below for
! MSC and drop MAX_BUF_SIZE a bit. Otherwise you may end up
! reallocating to 0 bytes. Such thing is not going to work too well.
! You have been warned!! */
! #if defined _MSC_VER && !defined WIN32
! /* Microsoft C 16-bit versions limit malloc to approx 65512 bytes.
! The REALLOC define eliminates a flurry of conversion warnings,
! but is not required. */
! # define MAX_BUF_SIZE 65500L
! # define REALLOC(p,s) realloc ((p), (size_t) (s))
! #else
! # define MAX_BUF_SIZE (1L << 16)
! # define REALLOC(p,s) realloc ((p), (s))
! #endif
/* Extend the buffer by twice its current size via realloc and
reset the pointers that pointed into the old block to point to the
--- 1590,1597 ----
/* This is not an arbitrary limit: the arguments which represent offsets
into the pattern are two bytes long. So if 2^16 bytes turns out to
be too small, many things would have to change. */
! #define MAX_BUF_SIZE (1L << 16)
! #define REALLOC(p,s) realloc ((p), (s))
/* Extend the buffer by twice its current size via realloc and
reset the pointers that pointed into the old block to point to the
Index: m32r-rom.c
===================================================================
RCS file: /cvs/uberbaum/gdb/m32r-rom.c,v
retrieving revision 1.8
diff -p -r1.8 m32r-rom.c
*** m32r-rom.c 2001/05/04 04:15:25 1.8
--- m32r-rom.c 2001/05/31 23:30:50
***************
*** 42,48 ****
extern void report_transfer_performance (unsigned long, time_t, time_t);
- #ifndef _MSC_VER
/*
* All this stuff just to get my host computer's IP address!
*/
--- 42,47 ----
*************** extern void report_transfer_performance
*** 52,58 ****
#if 1
#include <arpa/inet.h> /* for inet_ntoa */
#endif
- #endif
static char *board_addr; /* user-settable IP address for M32R-EVA */
static char *server_addr; /* user-settable IP address for gdb host */
--- 51,56 ----
*************** mon2000_open (char *args, int from_tty)
*** 392,399 ****
monitor_open (args, &mon2000_cmds, from_tty);
}
- #ifndef _MSC_VER
-
/* Function: set_board_address
Tell the BootOne monitor what it's ethernet IP address is. */
--- 390,395 ----
*************** m32r_upload_command (char *args, int fro
*** 575,582 ****
clear_symtab_users ();
}
- #endif /* ! _MSC_VER */
-
void
_initialize_m32r_rom (void)
{
--- 571,576 ----
*************** Specify the serial device it is connecte
*** 604,610 ****
mon2000_ops.to_open = mon2000_open;
add_target (&mon2000_ops);
- #ifndef _MSC_VER
add_show_from_set
(add_set_cmd ("download-path", class_obscure, var_string,
(char *) &download_path,
--- 598,603 ----
*************** Specify the serial device it is connecte
*** 630,634 ****
"Upload the srec file via the monitor's Ethernet upload capability.");
add_com ("tload", class_obscure, m32r_load, "test upload command.");
- #endif
}
--- 623,626 ----
Index: main.c
===================================================================
RCS file: /cvs/uberbaum/gdb/main.c,v
retrieving revision 1.10
diff -p -r1.10 main.c
*** main.c 2001/05/07 19:03:11 1.10
--- main.c 2001/05/31 23:30:51
*************** static void print_gdb_help (struct ui_fi
*** 90,99 ****
extern int enable_external_editor;
extern char *external_editor_command;
- #ifdef __CYGWIN__
- #include <sys/cygwin.h> /* for cygwin32_conv_to_posix_path */
- #endif
-
/* Call command_loop. If it happens to return, pass that through as a
non-zero return status. */
--- 90,95 ----
*************** extern int gdbtk_test (char *);
*** 534,554 ****
*before* all the command line arguments are processed; it sets
global parameters, which are independent of what file you are
debugging or what directory you are in. */
- #ifdef __CYGWIN__
- {
- char *tmp = getenv ("HOME");
-
- if (tmp != NULL)
- {
- homedir = (char *) alloca (PATH_MAX + 1);
- cygwin32_conv_to_posix_path (tmp, homedir);
- }
- else
- homedir = NULL;
- }
- #else
homedir = getenv ("HOME");
- #endif
if (homedir)
{
homeinit = (char *) alloca (strlen (homedir) +
--- 530,536 ----
Index: p-exp.y
===================================================================
RCS file: /cvs/uberbaum/gdb/p-exp.y,v
retrieving revision 1.5
diff -p -r1.5 p-exp.y
*** p-exp.y 2001/03/19 19:05:21 1.5
--- p-exp.y 2001/05/31 23:30:51
*************** Foundation, Inc., 59 Temple Place - Suit
*** 58,68 ****
#include "symfile.h" /* Required by objfiles.h. */
#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
- /* MSVC uses strnicmp instead of strncasecmp */
- #ifdef _MSC_VER
- #define strncasecmp strnicmp
- #endif
-
/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
as well as gratuitiously global symbol names, so we can have multiple
yacc generated parsers in gdb. Note that these are only the variables
--- 58,63 ----
Index: ser-e7kpc.c
===================================================================
RCS file: /cvs/uberbaum/gdb/ser-e7kpc.c,v
retrieving revision 1.5
diff -p -r1.5 ser-e7kpc.c
*** ser-e7kpc.c 2001/03/06 08:21:16 1.5
--- ser-e7kpc.c 2001/05/31 23:30:51
***************
*** 24,36 ****
#include "serial.h"
#include "gdb_string.h"
- /* MSVC uses strnicmp instead of strncasecmp */
- #ifdef _MSC_VER
- #define strncasecmp strnicmp
- #define WIN32_LEAN_AND_MEAN
- #endif
-
#ifdef _WIN32
#include <windows.h>
#endif
--- 24,31 ----
#include "serial.h"
#include "gdb_string.h"
#ifdef _WIN32
+ #define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
*************** sigs[] =
*** 129,164 ****
0
};
- #ifdef _MSC_VER
- /* Get the base of the data segment. This is needed to calculate the offset
- between data segment addresses and the base of linear memory, which is where
- device registers reside. Note that this is really only necessary for
- Win32s, since Win95 and NT keep the data segment at linear 0. */
-
- static unsigned long
- get_ds_base (void)
- {
- unsigned short dsval;
- LDT_ENTRY ldt;
- unsigned long dsbase;
-
- __asm
- {
- mov dsval, ds
- }
-
- dsbase = 0;
-
- GetThreadSelectorEntry (GetCurrentThread (), dsval, &ldt);
-
- dsbase = ldt.HighWord.Bits.BaseHi << 24 | ldt.HighWord.Bits.BaseMid << 16
- | ldt.BaseLow;
-
- return dsbase;
- }
- #else /* !_MSC_VER */
#define get_ds_base() 0
- #endif /* _MSC_VER */
static int
e7000pc_init (void)
--- 124,130 ----
Index: ser-tcp.c
===================================================================
RCS file: /cvs/uberbaum/gdb/ser-tcp.c,v
retrieving revision 1.4
diff -p -r1.4 ser-tcp.c
*** ser-tcp.c 2001/04/05 02:02:13 1.4
--- ser-tcp.c 2001/05/31 23:30:51
***************
*** 29,37 ****
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/socket.h>
- #ifndef __CYGWIN__
#include <netinet/tcp.h>
- #endif
#include <signal.h>
#include "gdb_string.h"
--- 29,35 ----
Index: utils.c
===================================================================
RCS file: /cvs/uberbaum/gdb/utils.c,v
retrieving revision 1.40
diff -p -r1.40 utils.c
*** utils.c 2001/04/19 23:56:13 1.40
--- utils.c 2001/05/31 23:30:52
*************** quit (void)
*** 868,902 ****
return_to_top_level (RETURN_QUIT);
}
-
- #if defined(_MSC_VER) /* should test for wingdb instead? */
-
- /*
- * Windows translates all keyboard and mouse events
- * into a message which is appended to the message
- * queue for the process.
- */
-
- void
- notice_quit (void)
- {
- int k = win32pollquit ();
- if (k == 1)
- quit_flag = 1;
- else if (k == 2)
- immediate_quit = 1;
- }
-
- #else /* !defined(_MSC_VER) */
-
- void
- notice_quit (void)
- {
- /* Done by signals */
- }
-
- #endif /* !defined(_MSC_VER) */
-
/* Control C comes here */
void
request_quit (int signo)
--- 868,873 ----
Index: values.c
===================================================================
RCS file: /cvs/uberbaum/gdb/values.c,v
retrieving revision 1.17
diff -p -r1.17 values.c
*** values.c 2001/05/21 20:08:59 1.17
--- values.c 2001/05/31 23:30:52
*************** unpack_double (struct type *type, char *
*** 695,706 ****
else if (nosign)
{
/* Unsigned -- be sure we compensate for signed LONGEST. */
- #if !defined (_MSC_VER) || (_MSC_VER > 900)
return (ULONGEST) unpack_long (type, valaddr);
- #else
- /* FIXME!!! msvc22 doesn't support unsigned __int64 -> double */
- return (LONGEST) unpack_long (type, valaddr);
- #endif /* _MSC_VER */
}
else
{
--- 695,701 ----
Index: nindy-share/ttyflush.c
===================================================================
RCS file: /cvs/uberbaum/gdb/nindy-share/ttyflush.c,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 ttyflush.c
*** ttyflush.c 1999/04/16 01:34:26 1.1.1.1
--- ttyflush.c 2001/05/31 23:30:52
***************
*** 22,32 ****
#include "defs.h"
#include "serial.h"
- #ifdef _MSC_VER
- # include <stdlib.h>
- # define sleep _sleep
- #endif
-
/* Flush all pending input and output for SERIAL, wait for a second, and
then if there is a character pending, discard it and flush again. */
--- 22,27 ----
Index: rdi-share/host.h
===================================================================
RCS file: /cvs/uberbaum/gdb/rdi-share/host.h,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 host.h
*** host.h 1999/04/16 01:34:27 1.1.1.1
--- host.h 2001/05/31 23:30:52
***************
*** 59,71 ****
# define COMPILING_ON_WINDOWS_CONSOLE 1
# define COMPILING_ON_WINDOWS 1
#endif
- #ifdef _MSC_VER
- # define COMPILING_ON_MSDOS 1
- # define COMPILING_ON_WINDOWS 1
- # if defined(__cplusplus)
- # define IMPLEMENT_BOOL_AS_INT 1 /* VC++ doesn't have 'bool' (yet) */
- # endif
- #endif
/* The '(defined(__sparc) && defined(P_tmpdir) */
/* && !defined(__svr4__))' is to detect gcc on SunOS. */
/* C++ compilers don't have to define __STDC__ */
--- 59,64 ----
*************** typedef char *ArgvType;
*** 187,194 ****
# define FILENAME_MAX 256
#endif
! #if (!defined(__STDC__) && !defined(__cplusplus) && !defined(_MSC_VER)) || \
! defined(COMPILING_ON_SUNOS)
/* Use bcopy rather than memmove, as memmove is not available. */
/* There does not seem to be a header for bcopy. */
void bcopy(const char *src, char *dst, int length);
--- 180,186 ----
# define FILENAME_MAX 256
#endif
! #if (!defined(__STDC__) && !defined(__cplusplus) || defined(COMPILING_ON_SUNOS)
/* Use bcopy rather than memmove, as memmove is not available. */
/* There does not seem to be a header for bcopy. */
void bcopy(const char *src, char *dst, int length);
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA?] Windows cleanup
2001-05-31 16:40 ` Christopher Faylor
@ 2001-05-31 19:29 ` Fernando Nasser
2001-05-31 22:42 ` Eli Zaretskii
1 sibling, 0 replies; 10+ messages in thread
From: Fernando Nasser @ 2001-05-31 19:29 UTC (permalink / raw)
To: Christopher Faylor; +Cc: gdb-patches
Chris,
I confess I cannot say much about the Windows conditionals but I trust
your judgement. So, please consider the rdi-share part approved. I
will try to build some ARM gdb's to test it.
Regards,
Fernando
Christopher Faylor wrote:
>
> On Thu, May 31, 2001 at 05:30:55PM +0300, Eli Zaretskii wrote:
> >On Wed, 30 May 2001, Christopher Faylor wrote:
> >>I think that all of these qualify as obvious fixes, given that I'm the
> >>Cygwin maintainer and _MSC_VER is no longer supported, however, I'd
> >>like someone to verify that I properly whacked the ifdefs since I can't
> >>really test things like "nindy-share".
> >
> >The changes look good to me, except that:
>
> Doh. I somehow really botched that patch. I wish I hadn't restarted my
> X session so I could track down how I did that.
>
> Anyway, this one should be a little better. I've addressed Eli's concerns,
> I think.
>
> Thanks to Eli and Fernando for checking this out for me and catching my
> patch gaffe.
>
> cgf
>
> Wed May 30 23:02:44 2001 Christopher Faylor <cgf@cygnus.com>
>
> * gnu-regex.c: Eliminate obsolete check for _MSC_VER.
> * utils.c (notice_quit): Remove dummy function only used for _MSC_VER.
> * values.c (unpack_double): Remove obsolete check for _MSC_VER.
> * defs.h: Ditto.
> * m32r-rom.c: Ditto.
> * p-exp.y: Ditto.
> * ser-e7kpc.c: Ditto. Define WIN32_LEAN_AND_MEAN under _WIN32, for
> faster compilation.
> (get_ds_base): Remove _MSC_VER version of this function.
> * nindy-share/ttyflush.c: Ditto. X
> * rdi-share/host.h: Ditto. X
>
> * main.c (captured_main): Eliminate special Cygwin checks.
> * ser-tcp.c: Remove unneeded __CYGWIN__ guard against system include.
>
> Index: defs.h
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/defs.h,v
> retrieving revision 1.50
> diff -p -r1.50 defs.h
> *** defs.h 2001/05/15 00:03:36 1.50
> --- defs.h 2001/05/31 23:30:49
> *************** typedef struct ptid ptid_t;
> *** 920,932 ****
> #include "fopen-same.h"
> #endif
>
> - /* Microsoft C can't deal with const pointers */
> -
> - #ifdef _MSC_VER
> - #define CONST_PTR
> - #else
> #define CONST_PTR const
> - #endif
>
> /* Defaults for system-wide constants (if not defined by xm.h, we fake it).
> FIXME: Assumes 2's complement arithmetic */
> --- 920,926 ----
> *************** extern char *getenv (const char *);
> *** 1092,1102 ****
> #endif
>
> #ifdef HAVE_STDLIB_H
> - #if defined(_MSC_VER) && !defined(__cplusplus)
> - /* msvc defines these in stdlib.h for c code */
> - #undef min
> - #undef max
> - #endif
> #include <stdlib.h>
> #endif
> #ifndef min
> --- 1086,1091 ----
> Index: gnu-regex.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/gnu-regex.c,v
> retrieving revision 1.5
> diff -p -r1.5 gnu-regex.c
> *** gnu-regex.c 2001/03/06 08:21:07 1.5
> --- gnu-regex.c 2001/05/31 23:30:50
> *************** static reg_errcode_t compile_range _RE_A
> *** 1590,1610 ****
> /* This is not an arbitrary limit: the arguments which represent offsets
> into the pattern are two bytes long. So if 2^16 bytes turns out to
> be too small, many things would have to change. */
> ! /* Any other compiler which, like MSC, has allocation limit below 2^16
> ! bytes will have to use approach similar to what was done below for
> ! MSC and drop MAX_BUF_SIZE a bit. Otherwise you may end up
> ! reallocating to 0 bytes. Such thing is not going to work too well.
> ! You have been warned!! */
> ! #if defined _MSC_VER && !defined WIN32
> ! /* Microsoft C 16-bit versions limit malloc to approx 65512 bytes.
> ! The REALLOC define eliminates a flurry of conversion warnings,
> ! but is not required. */
> ! # define MAX_BUF_SIZE 65500L
> ! # define REALLOC(p,s) realloc ((p), (size_t) (s))
> ! #else
> ! # define MAX_BUF_SIZE (1L << 16)
> ! # define REALLOC(p,s) realloc ((p), (s))
> ! #endif
>
> /* Extend the buffer by twice its current size via realloc and
> reset the pointers that pointed into the old block to point to the
> --- 1590,1597 ----
> /* This is not an arbitrary limit: the arguments which represent offsets
> into the pattern are two bytes long. So if 2^16 bytes turns out to
> be too small, many things would have to change. */
> ! #define MAX_BUF_SIZE (1L << 16)
> ! #define REALLOC(p,s) realloc ((p), (s))
>
> /* Extend the buffer by twice its current size via realloc and
> reset the pointers that pointed into the old block to point to the
> Index: m32r-rom.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/m32r-rom.c,v
> retrieving revision 1.8
> diff -p -r1.8 m32r-rom.c
> *** m32r-rom.c 2001/05/04 04:15:25 1.8
> --- m32r-rom.c 2001/05/31 23:30:50
> ***************
> *** 42,48 ****
>
> extern void report_transfer_performance (unsigned long, time_t, time_t);
>
> - #ifndef _MSC_VER
> /*
> * All this stuff just to get my host computer's IP address!
> */
> --- 42,47 ----
> *************** extern void report_transfer_performance
> *** 52,58 ****
> #if 1
> #include <arpa/inet.h> /* for inet_ntoa */
> #endif
> - #endif
>
> static char *board_addr; /* user-settable IP address for M32R-EVA */
> static char *server_addr; /* user-settable IP address for gdb host */
> --- 51,56 ----
> *************** mon2000_open (char *args, int from_tty)
> *** 392,399 ****
> monitor_open (args, &mon2000_cmds, from_tty);
> }
>
> - #ifndef _MSC_VER
> -
> /* Function: set_board_address
> Tell the BootOne monitor what it's ethernet IP address is. */
>
> --- 390,395 ----
> *************** m32r_upload_command (char *args, int fro
> *** 575,582 ****
> clear_symtab_users ();
> }
>
> - #endif /* ! _MSC_VER */
> -
> void
> _initialize_m32r_rom (void)
> {
> --- 571,576 ----
> *************** Specify the serial device it is connecte
> *** 604,610 ****
> mon2000_ops.to_open = mon2000_open;
> add_target (&mon2000_ops);
>
> - #ifndef _MSC_VER
> add_show_from_set
> (add_set_cmd ("download-path", class_obscure, var_string,
> (char *) &download_path,
> --- 598,603 ----
> *************** Specify the serial device it is connecte
> *** 630,634 ****
> "Upload the srec file via the monitor's Ethernet upload capability.");
>
> add_com ("tload", class_obscure, m32r_load, "test upload command.");
> - #endif
> }
> --- 623,626 ----
> Index: main.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/main.c,v
> retrieving revision 1.10
> diff -p -r1.10 main.c
> *** main.c 2001/05/07 19:03:11 1.10
> --- main.c 2001/05/31 23:30:51
> *************** static void print_gdb_help (struct ui_fi
> *** 90,99 ****
> extern int enable_external_editor;
> extern char *external_editor_command;
>
> - #ifdef __CYGWIN__
> - #include <sys/cygwin.h> /* for cygwin32_conv_to_posix_path */
> - #endif
> -
> /* Call command_loop. If it happens to return, pass that through as a
> non-zero return status. */
>
> --- 90,95 ----
> *************** extern int gdbtk_test (char *);
> *** 534,554 ****
> *before* all the command line arguments are processed; it sets
> global parameters, which are independent of what file you are
> debugging or what directory you are in. */
> - #ifdef __CYGWIN__
> - {
> - char *tmp = getenv ("HOME");
> -
> - if (tmp != NULL)
> - {
> - homedir = (char *) alloca (PATH_MAX + 1);
> - cygwin32_conv_to_posix_path (tmp, homedir);
> - }
> - else
> - homedir = NULL;
> - }
> - #else
> homedir = getenv ("HOME");
> - #endif
> if (homedir)
> {
> homeinit = (char *) alloca (strlen (homedir) +
> --- 530,536 ----
> Index: p-exp.y
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/p-exp.y,v
> retrieving revision 1.5
> diff -p -r1.5 p-exp.y
> *** p-exp.y 2001/03/19 19:05:21 1.5
> --- p-exp.y 2001/05/31 23:30:51
> *************** Foundation, Inc., 59 Temple Place - Suit
> *** 58,68 ****
> #include "symfile.h" /* Required by objfiles.h. */
> #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
>
> - /* MSVC uses strnicmp instead of strncasecmp */
> - #ifdef _MSC_VER
> - #define strncasecmp strnicmp
> - #endif
> -
> /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
> as well as gratuitiously global symbol names, so we can have multiple
> yacc generated parsers in gdb. Note that these are only the variables
> --- 58,63 ----
> Index: ser-e7kpc.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/ser-e7kpc.c,v
> retrieving revision 1.5
> diff -p -r1.5 ser-e7kpc.c
> *** ser-e7kpc.c 2001/03/06 08:21:16 1.5
> --- ser-e7kpc.c 2001/05/31 23:30:51
> ***************
> *** 24,36 ****
> #include "serial.h"
> #include "gdb_string.h"
>
> - /* MSVC uses strnicmp instead of strncasecmp */
> - #ifdef _MSC_VER
> - #define strncasecmp strnicmp
> - #define WIN32_LEAN_AND_MEAN
> - #endif
> -
> #ifdef _WIN32
> #include <windows.h>
> #endif
>
> --- 24,31 ----
> #include "serial.h"
> #include "gdb_string.h"
>
> #ifdef _WIN32
> + #define WIN32_LEAN_AND_MEAN
> #include <windows.h>
> #endif
>
> *************** sigs[] =
> *** 129,164 ****
> 0
> };
>
> - #ifdef _MSC_VER
> - /* Get the base of the data segment. This is needed to calculate the offset
> - between data segment addresses and the base of linear memory, which is where
> - device registers reside. Note that this is really only necessary for
> - Win32s, since Win95 and NT keep the data segment at linear 0. */
> -
> - static unsigned long
> - get_ds_base (void)
> - {
> - unsigned short dsval;
> - LDT_ENTRY ldt;
> - unsigned long dsbase;
> -
> - __asm
> - {
> - mov dsval, ds
> - }
> -
> - dsbase = 0;
> -
> - GetThreadSelectorEntry (GetCurrentThread (), dsval, &ldt);
> -
> - dsbase = ldt.HighWord.Bits.BaseHi << 24 | ldt.HighWord.Bits.BaseMid << 16
> - | ldt.BaseLow;
> -
> - return dsbase;
> - }
> - #else /* !_MSC_VER */
> #define get_ds_base() 0
> - #endif /* _MSC_VER */
>
> static int
> e7000pc_init (void)
> --- 124,130 ----
> Index: ser-tcp.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/ser-tcp.c,v
> retrieving revision 1.4
> diff -p -r1.4 ser-tcp.c
> *** ser-tcp.c 2001/04/05 02:02:13 1.4
> --- ser-tcp.c 2001/05/31 23:30:51
> ***************
> *** 29,37 ****
> #include <arpa/inet.h>
> #include <netdb.h>
> #include <sys/socket.h>
> - #ifndef __CYGWIN__
> #include <netinet/tcp.h>
> - #endif
>
> #include <signal.h>
> #include "gdb_string.h"
> --- 29,35 ----
> Index: utils.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/utils.c,v
> retrieving revision 1.40
> diff -p -r1.40 utils.c
> *** utils.c 2001/04/19 23:56:13 1.40
> --- utils.c 2001/05/31 23:30:52
> *************** quit (void)
> *** 868,902 ****
> return_to_top_level (RETURN_QUIT);
> }
>
> -
> - #if defined(_MSC_VER) /* should test for wingdb instead? */
> -
> - /*
> - * Windows translates all keyboard and mouse events
> - * into a message which is appended to the message
> - * queue for the process.
> - */
> -
> - void
> - notice_quit (void)
> - {
> - int k = win32pollquit ();
> - if (k == 1)
> - quit_flag = 1;
> - else if (k == 2)
> - immediate_quit = 1;
> - }
> -
> - #else /* !defined(_MSC_VER) */
> -
> - void
> - notice_quit (void)
> - {
> - /* Done by signals */
> - }
> -
> - #endif /* !defined(_MSC_VER) */
> -
> /* Control C comes here */
> void
> request_quit (int signo)
> --- 868,873 ----
> Index: values.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/values.c,v
> retrieving revision 1.17
> diff -p -r1.17 values.c
> *** values.c 2001/05/21 20:08:59 1.17
> --- values.c 2001/05/31 23:30:52
> *************** unpack_double (struct type *type, char *
> *** 695,706 ****
> else if (nosign)
> {
> /* Unsigned -- be sure we compensate for signed LONGEST. */
> - #if !defined (_MSC_VER) || (_MSC_VER > 900)
> return (ULONGEST) unpack_long (type, valaddr);
> - #else
> - /* FIXME!!! msvc22 doesn't support unsigned __int64 -> double */
> - return (LONGEST) unpack_long (type, valaddr);
> - #endif /* _MSC_VER */
> }
> else
> {
> --- 695,701 ----
> Index: nindy-share/ttyflush.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/nindy-share/ttyflush.c,v
> retrieving revision 1.1.1.1
> diff -p -r1.1.1.1 ttyflush.c
> *** ttyflush.c 1999/04/16 01:34:26 1.1.1.1
> --- ttyflush.c 2001/05/31 23:30:52
> ***************
> *** 22,32 ****
> #include "defs.h"
> #include "serial.h"
>
> - #ifdef _MSC_VER
> - # include <stdlib.h>
> - # define sleep _sleep
> - #endif
> -
> /* Flush all pending input and output for SERIAL, wait for a second, and
> then if there is a character pending, discard it and flush again. */
>
> --- 22,27 ----
> Index: rdi-share/host.h
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/rdi-share/host.h,v
> retrieving revision 1.1.1.1
> diff -p -r1.1.1.1 host.h
> *** host.h 1999/04/16 01:34:27 1.1.1.1
> --- host.h 2001/05/31 23:30:52
> ***************
> *** 59,71 ****
> # define COMPILING_ON_WINDOWS_CONSOLE 1
> # define COMPILING_ON_WINDOWS 1
> #endif
> - #ifdef _MSC_VER
> - # define COMPILING_ON_MSDOS 1
> - # define COMPILING_ON_WINDOWS 1
> - # if defined(__cplusplus)
> - # define IMPLEMENT_BOOL_AS_INT 1 /* VC++ doesn't have 'bool' (yet) */
> - # endif
> - #endif
> /* The '(defined(__sparc) && defined(P_tmpdir) */
> /* && !defined(__svr4__))' is to detect gcc on SunOS. */
> /* C++ compilers don't have to define __STDC__ */
> --- 59,64 ----
> *************** typedef char *ArgvType;
> *** 187,194 ****
> # define FILENAME_MAX 256
> #endif
>
> ! #if (!defined(__STDC__) && !defined(__cplusplus) && !defined(_MSC_VER)) || \
> ! defined(COMPILING_ON_SUNOS)
> /* Use bcopy rather than memmove, as memmove is not available. */
> /* There does not seem to be a header for bcopy. */
> void bcopy(const char *src, char *dst, int length);
> --- 180,186 ----
> # define FILENAME_MAX 256
> #endif
>
> ! #if (!defined(__STDC__) && !defined(__cplusplus) || defined(COMPILING_ON_SUNOS)
> /* Use bcopy rather than memmove, as memmove is not available. */
> /* There does not seem to be a header for bcopy. */
> void bcopy(const char *src, char *dst, int length);
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA?] Windows cleanup
2001-05-31 16:40 ` Christopher Faylor
2001-05-31 19:29 ` Fernando Nasser
@ 2001-05-31 22:42 ` Eli Zaretskii
2001-06-01 7:31 ` Christopher Faylor
1 sibling, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2001-05-31 22:42 UTC (permalink / raw)
To: cgf; +Cc: gdb-patches
> Date: Thu, 31 May 2001 19:40:13 -0400
> From: Christopher Faylor <cgf@redhat.com>
>
> Doh. I somehow really botched that patch. I wish I hadn't restarted my
> X session so I could track down how I did that.
>
> Anyway, this one should be a little better. I've addressed Eli's concerns,
> I think.
Thanks.
The only comment I have now is that, since notice_quit is removed, its
calls should also be removed, otherwise GDB might not build for some
of the configurations. I see notice_quit is called in ser-go32.c,
remote-e7000.c and remote-sim.c.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA?] Windows cleanup
2001-05-31 22:42 ` Eli Zaretskii
@ 2001-06-01 7:31 ` Christopher Faylor
0 siblings, 0 replies; 10+ messages in thread
From: Christopher Faylor @ 2001-06-01 7:31 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
On Fri, Jun 01, 2001 at 08:41:31AM +0300, Eli Zaretskii wrote:
>> Date: Thu, 31 May 2001 19:40:13 -0400
>> From: Christopher Faylor <cgf@redhat.com>
>>
>> Doh. I somehow really botched that patch. I wish I hadn't restarted my
>> X session so I could track down how I did that.
>>
>> Anyway, this one should be a little better. I've addressed Eli's concerns,
>> I think.
>
>Thanks.
>
>The only comment I have now is that, since notice_quit is removed, its
>calls should also be removed, otherwise GDB might not build for some
>of the configurations. I see notice_quit is called in ser-go32.c,
>remote-e7000.c and remote-sim.c.
Ok. You're right, of course. I've removed these in my sandbox. I'll
update the ChangeLog appropriately.
cgf
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA?] Windows cleanup
2001-05-30 20:22 [RFA?] Windows cleanup Christopher Faylor
2001-05-31 7:29 ` Eli Zaretskii
@ 2001-06-06 5:12 ` Andrew Cagney
2001-06-06 6:42 ` Eli Zaretskii
2001-06-10 9:29 ` Christopher Faylor
2001-06-06 10:29 ` Elena Zannoni
2 siblings, 2 replies; 10+ messages in thread
From: Andrew Cagney @ 2001-06-06 5:12 UTC (permalink / raw)
To: Christopher Faylor; +Cc: gdb-patches
> I think that all of these qualify as obvious fixes
Yes, the changes were proposed, discussed and then, eventually,
consensus reached. The important step being ``discussed''. This leaves
the actual changes as ``obvious'' :-)
Andrew
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA?] Windows cleanup
2001-06-06 5:12 ` Andrew Cagney
@ 2001-06-06 6:42 ` Eli Zaretskii
2001-06-10 9:29 ` Christopher Faylor
1 sibling, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2001-06-06 6:42 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Christopher Faylor, gdb-patches
On Wed, 6 Jun 2001, Andrew Cagney wrote:
> > I think that all of these qualify as obvious fixes
>
>
> Yes, the changes were proposed, discussed and then, eventually,
> consensus reached. The important step being ``discussed''. This leaves
> the actual changes as ``obvious'' :-)
We'll see ;-) I intend to begin soon posting patches for all of the
cleanups and ask for approval (IIRC, some of them allowed several
possible solutions, and we didn't identify a single one everybody liked).
I intended to do that sooner, but got bogged in the backlog...
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA?] Windows cleanup
2001-05-30 20:22 [RFA?] Windows cleanup Christopher Faylor
2001-05-31 7:29 ` Eli Zaretskii
2001-06-06 5:12 ` Andrew Cagney
@ 2001-06-06 10:29 ` Elena Zannoni
2 siblings, 0 replies; 10+ messages in thread
From: Elena Zannoni @ 2001-06-06 10:29 UTC (permalink / raw)
To: Christopher Faylor; +Cc: gdb-patches
The partial-stab.h change is unrelated, right? I think it is another
patch, another thread.
http://sources.redhat.com/ml/gdb-patches/2001-05/msg00489.html
Elena
Christopher Faylor writes:
> I should probably submit these as two patches. One part cleans up some
> cygwin ifdefs, the other eliminates _MSC_VER tests.
>
> I think that all of these qualify as obvious fixes, given that I'm the
> Cygwin maintainer and _MSC_VER is no longer supported, however, I'd
> like someone to verify that I properly whacked the ifdefs since I can't
> really test things like "nindy-share".
>
> Thanks to Eli for pointing all of this out a while ago. I love
> eliminating obsolete stuff.
>
> cgf
>
> Wed May 30 23:02:44 2001 Christopher Faylor <cgf@cygnus.com>
>
> * gnu-regex.c: Eliminate obsolete check for _MSC_VER.
> * utils.c (quit): Ditto.
> * values.c (unpack_double): Ditto.
> * defs.h: Ditto.
> * m32-rom.c: Ditto.
> * p-exp.y: Ditto.
> * ser-e7kpc.c: Ditto. Define WIN32_LEAN_AND_MEAN under _WIN32, for
> faster compilation.
> (get_ds_base): Remove _MSC_VER version of this function.
> * utils.c (notice_quit): Ditto.
> * values.c (unpack_double): Remove obsolete check for _MSC_VER.
> * nindy-share/ttyflush.c: Ditto.
> * rdi-share/host.h: Ditto.
>
> * main.c (captured_main): Eliminate special Cygwin checks.
> * ser-tcp.c: Remove unneeded __CYGWIN__ guard against system include.
>
> Index: gnu-regex.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/gnu-regex.c,v
> retrieving revision 1.5
> diff -c -2 -0 -p -r1.5 gnu-regex.c
> *** gnu-regex.c 2001/03/06 08:21:07 1.5
> --- gnu-regex.c 2001/05/30 21:34:57
> *************** static reg_errcode_t compile_range _RE_A
> *** 1573,1627 ****
> relative address offset by the three bytes the jump itself occupies. */
> #define STORE_JUMP(op, loc, to) \
> store_op1 (op, loc, (int) ((to) - (loc) - 3))
>
> /* Likewise, for a two-argument jump. */
> #define STORE_JUMP2(op, loc, to, arg) \
> store_op2 (op, loc, (int) ((to) - (loc) - 3), arg)
>
> /* Like `STORE_JUMP', but for inserting. Assume `b' is the buffer end. */
> #define INSERT_JUMP(op, loc, to) \
> insert_op1 (op, loc, (int) ((to) - (loc) - 3), b)
>
> /* Like `STORE_JUMP2', but for inserting. Assume `b' is the buffer end. */
> #define INSERT_JUMP2(op, loc, to, arg) \
> insert_op2 (op, loc, (int) ((to) - (loc) - 3), arg, b)
>
>
> /* This is not an arbitrary limit: the arguments which represent offsets
> into the pattern are two bytes long. So if 2^16 bytes turns out to
> be too small, many things would have to change. */
> ! /* Any other compiler which, like MSC, has allocation limit below 2^16
> ! bytes will have to use approach similar to what was done below for
> ! MSC and drop MAX_BUF_SIZE a bit. Otherwise you may end up
> ! reallocating to 0 bytes. Such thing is not going to work too well.
> ! You have been warned!! */
> ! #if defined _MSC_VER && !defined WIN32
> ! /* Microsoft C 16-bit versions limit malloc to approx 65512 bytes.
> ! The REALLOC define eliminates a flurry of conversion warnings,
> ! but is not required. */
> ! # define MAX_BUF_SIZE 65500L
> ! # define REALLOC(p,s) realloc ((p), (size_t) (s))
> ! #else
> ! # define MAX_BUF_SIZE (1L << 16)
> ! # define REALLOC(p,s) realloc ((p), (s))
> ! #endif
>
> /* Extend the buffer by twice its current size via realloc and
> reset the pointers that pointed into the old block to point to the
> correct places in the new one. If extending the buffer results in it
> being larger than MAX_BUF_SIZE, then flag memory exhausted. */
> #define EXTEND_BUFFER() \
> do { \
> unsigned char *old_buffer = bufp->buffer; \
> if (bufp->allocated == MAX_BUF_SIZE) \
> return REG_ESIZE; \
> bufp->allocated <<= 1; \
> if (bufp->allocated > MAX_BUF_SIZE) \
> bufp->allocated = MAX_BUF_SIZE; \
> bufp->buffer = (unsigned char *) REALLOC (bufp->buffer, bufp->allocated);\
> if (bufp->buffer == NULL) \
> return REG_ESPACE; \
> /* If the buffer moved, move all the pointers into it. */ \
> if (old_buffer != bufp->buffer) \
> { \
> b = (b - old_buffer) + bufp->buffer; \
> --- 1573,1614 ----
> relative address offset by the three bytes the jump itself occupies. */
> #define STORE_JUMP(op, loc, to) \
> store_op1 (op, loc, (int) ((to) - (loc) - 3))
>
> /* Likewise, for a two-argument jump. */
> #define STORE_JUMP2(op, loc, to, arg) \
> store_op2 (op, loc, (int) ((to) - (loc) - 3), arg)
>
> /* Like `STORE_JUMP', but for inserting. Assume `b' is the buffer end. */
> #define INSERT_JUMP(op, loc, to) \
> insert_op1 (op, loc, (int) ((to) - (loc) - 3), b)
>
> /* Like `STORE_JUMP2', but for inserting. Assume `b' is the buffer end. */
> #define INSERT_JUMP2(op, loc, to, arg) \
> insert_op2 (op, loc, (int) ((to) - (loc) - 3), arg, b)
>
>
> /* This is not an arbitrary limit: the arguments which represent offsets
> into the pattern are two bytes long. So if 2^16 bytes turns out to
> be too small, many things would have to change. */
> ! #define MAX_BUF_SIZE (1L << 16)
> ! #define REALLOC(p,s) realloc ((p), (s))
>
> /* Extend the buffer by twice its current size via realloc and
> reset the pointers that pointed into the old block to point to the
> correct places in the new one. If extending the buffer results in it
> being larger than MAX_BUF_SIZE, then flag memory exhausted. */
> #define EXTEND_BUFFER() \
> do { \
> unsigned char *old_buffer = bufp->buffer; \
> if (bufp->allocated == MAX_BUF_SIZE) \
> return REG_ESIZE; \
> bufp->allocated <<= 1; \
> if (bufp->allocated > MAX_BUF_SIZE) \
> bufp->allocated = MAX_BUF_SIZE; \
> bufp->buffer = (unsigned char *) REALLOC (bufp->buffer, bufp->allocated);\
> if (bufp->buffer == NULL) \
> return REG_ESPACE; \
> /* If the buffer moved, move all the pointers into it. */ \
> if (old_buffer != bufp->buffer) \
> { \
> b = (b - old_buffer) + bufp->buffer; \
> Index: main.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/main.c,v
> retrieving revision 1.10
> diff -c -2 -0 -p -r1.10 main.c
> *** main.c 2001/05/07 19:03:11 1.10
> --- main.c 2001/05/30 21:34:58
> *************** int dbx_commands = 0;
> *** 73,116 ****
> struct ui_file *gdb_stdout;
> struct ui_file *gdb_stderr;
> struct ui_file *gdb_stdlog;
> struct ui_file *gdb_stdtarg;
>
> /* Used to initialize error() - defined in utils.c */
>
> extern void error_init (void);
>
> /* Whether to enable writing into executable and core files */
> extern int write_files;
>
> static void print_gdb_help (struct ui_file *);
>
> /* These two are used to set the external editor commands when gdb is farming
> out files to be edited by another program. */
>
> extern int enable_external_editor;
> extern char *external_editor_command;
>
> - #ifdef __CYGWIN__
> - #include <sys/cygwin.h> /* for cygwin32_conv_to_posix_path */
> - #endif
> -
> /* Call command_loop. If it happens to return, pass that through as a
> non-zero return status. */
>
> static int
> captured_command_loop (void *data)
> {
> if (command_loop_hook == NULL)
> command_loop ();
> else
> command_loop_hook ();
> /* FIXME: cagney/1999-11-05: A correct command_loop() implementaton
> would clean things up (restoring the cleanup chain) to the state
> they were just prior to the call. Technically, this means that
> the do_cleanups() below is redundant. Unfortunately, many FUNCs
> are not that well behaved. do_cleanups should either be replaced
> with a do_cleanups call (to cover the problem) or an assertion
> check to detect bad FUNCs code. */
> do_cleanups (ALL_CLEANUPS);
> /* If the command_loop returned, normally (rather than threw an
> error) we try to quit. If the quit is aborted, catch_errors()
> --- 73,112 ----
> *************** extern int gdbtk_test (char *);
> *** 517,571 ****
> {
> /* Print all the junk at the top, with trailing "..." if we are about
> to read a symbol file (possibly slowly). */
> print_gdb_version (gdb_stdout);
> if (symarg)
> printf_filtered ("..");
> wrap_here ("");
> gdb_flush (gdb_stdout); /* Force to screen during slow operations */
> }
>
> error_pre_print = "\n\n";
> quit_pre_print = error_pre_print;
>
> /* We may get more than one warning, don't double space all of them... */
> warning_pre_print = "\nwarning: ";
>
> /* Read and execute $HOME/.gdbinit file, if it exists. This is done
> *before* all the command line arguments are processed; it sets
> global parameters, which are independent of what file you are
> debugging or what directory you are in. */
> - #ifdef __CYGWIN__
> - {
> - char *tmp = getenv ("HOME");
> -
> - if (tmp != NULL)
> - {
> - homedir = (char *) alloca (PATH_MAX + 1);
> - cygwin32_conv_to_posix_path (tmp, homedir);
> - }
> - else
> - homedir = NULL;
> - }
> - #else
> homedir = getenv ("HOME");
> - #endif
> if (homedir)
> {
> homeinit = (char *) alloca (strlen (homedir) +
> strlen (gdbinit) + 10);
> strcpy (homeinit, homedir);
> strcat (homeinit, "/");
> strcat (homeinit, gdbinit);
>
> if (!inhibit_gdbinit)
> {
> catch_command_errors (source_command, homeinit, 0, RETURN_MASK_ALL);
> }
>
> /* Do stats; no need to do them elsewhere since we'll only
> need them if homedir is set. Make sure that they are
> zero in case one of them fails (this guarantees that they
> won't match if either exists). */
>
> memset (&homebuf, 0, sizeof (struct stat));
> memset (&cwdbuf, 0, sizeof (struct stat));
> --- 513,553 ----
> Index: partial-stab.h
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/partial-stab.h,v
> retrieving revision 1.7
> diff -c -2 -0 -p -r1.7 partial-stab.h
> *** partial-stab.h 2001/03/06 08:21:11 1.7
> --- partial-stab.h 2001/05/30 21:34:59
> *************** switch (CUR_SYMBOL_TYPE)
> *** 583,626 ****
> #ifdef SOFUN_ADDRESS_MAYBE_MISSING
> /* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
> value for the bottom of the text seg in those cases. */
> if (pst && textlow_not_set)
> {
> pst->textlow =
> find_stab_function_addr (namestring, pst->filename, objfile);
> textlow_not_set = 0;
> }
> #endif
> /* End kludge. */
>
> /* Keep track of the start of the last function so we
> can handle end of function symbols. */
> last_function_start = CUR_SYMBOL_VALUE;
>
> /* In reordered executables this function may lie outside
> the bounds created by N_SO symbols. If that's the case
> use the address of this function as the low bound for
> the partial symbol table. */
> ! if (textlow_not_set
> ! || (pst && CUR_SYMBOL_VALUE < pst->textlow
> ! && CUR_SYMBOL_VALUE
> ! != ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile))))
> {
> pst->textlow = CUR_SYMBOL_VALUE;
> textlow_not_set = 0;
> }
> #endif /* DBXREAD_ONLY */
> add_psymbol_to_list (namestring, p - namestring,
> VAR_NAMESPACE, LOC_BLOCK,
> &objfile->static_psymbols,
> 0, CUR_SYMBOL_VALUE,
> psymtab_language, objfile);
> continue;
>
> /* Global functions were ignored here, but now they
> are put into the global psymtab like one would expect.
> They're also in the minimal symbol table. */
> case 'F':
> CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
> #ifdef DBXREAD_ONLY
> /* Kludges for ELF/STABS with Sun ACC */
> last_function_name = namestring;
> --- 583,627 ----
> #ifdef SOFUN_ADDRESS_MAYBE_MISSING
> /* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
> value for the bottom of the text seg in those cases. */
> if (pst && textlow_not_set)
> {
> pst->textlow =
> find_stab_function_addr (namestring, pst->filename, objfile);
> textlow_not_set = 0;
> }
> #endif
> /* End kludge. */
>
> /* Keep track of the start of the last function so we
> can handle end of function symbols. */
> last_function_start = CUR_SYMBOL_VALUE;
>
> /* In reordered executables this function may lie outside
> the bounds created by N_SO symbols. If that's the case
> use the address of this function as the low bound for
> the partial symbol table. */
> ! if (pst
> ! && (textlow_not_set
> ! || (pst && CUR_SYMBOL_VALUE < pst->textlow
> ! && CUR_SYMBOL_VALUE
> ! != ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)))))
> {
> pst->textlow = CUR_SYMBOL_VALUE;
> textlow_not_set = 0;
> }
> #endif /* DBXREAD_ONLY */
> add_psymbol_to_list (namestring, p - namestring,
> VAR_NAMESPACE, LOC_BLOCK,
> &objfile->static_psymbols,
> 0, CUR_SYMBOL_VALUE,
> psymtab_language, objfile);
> continue;
>
> /* Global functions were ignored here, but now they
> are put into the global psymtab like one would expect.
> They're also in the minimal symbol table. */
> case 'F':
> CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
> #ifdef DBXREAD_ONLY
> /* Kludges for ELF/STABS with Sun ACC */
> last_function_name = namestring;
> Index: ser-tcp.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/ser-tcp.c,v
> retrieving revision 1.4
> diff -c -2 -0 -p -r1.4 ser-tcp.c
> *** ser-tcp.c 2001/04/05 02:02:13 1.4
> --- ser-tcp.c 2001/05/30 21:34:59
> ***************
> *** 12,54 ****
> This program is distributed in the hope that it will be useful,
> but WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> GNU General Public License for more details.
>
> You should have received a copy of the GNU General Public License
> along with this program; if not, write to the Free Software
> Foundation, Inc., 59 Temple Place - Suite 330,
> Boston, MA 02111-1307, USA. */
>
> #include "defs.h"
> #include "serial.h"
> #include "ser-unix.h"
>
> #include <sys/types.h>
> #include <sys/time.h>
> #include <netinet/in.h>
> #include <arpa/inet.h>
> #include <netdb.h>
> #include <sys/socket.h>
> - #ifndef __CYGWIN__
> - #include <netinet/tcp.h>
> - #endif
>
> #include <signal.h>
> #include "gdb_string.h"
>
> static int tcp_open (serial_t scb, const char *name);
> static void tcp_close (serial_t scb);
>
> void _initialize_ser_tcp (void);
>
> /* Open up a raw tcp socket */
>
> static int
> tcp_open (serial_t scb, const char *name)
> {
> char *port_str;
> int port;
> struct hostent *hostent;
> struct sockaddr_in sockaddr;
> int tmp;
> char hostname[100];
> --- 12,51 ----
> Index: utils.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/utils.c,v
> retrieving revision 1.40
> diff -c -2 -0 -p -r1.40 utils.c
> *** utils.c 2001/04/19 23:56:13 1.40
> --- utils.c 2001/05/30 21:35:01
> *************** quit (void)
> *** 851,918 ****
> if (quit_pre_print)
> fprintf_unfiltered (gdb_stderr, quit_pre_print);
>
> #ifdef __MSDOS__
> /* No steenking SIGINT will ever be coming our way when the
> program is resumed. Don't lie. */
> fprintf_unfiltered (gdb_stderr, "Quit\n");
> #else
> if (job_control
> /* If there is no terminal switching for this target, then we can't
> possibly get screwed by the lack of job control. */
> || current_target.to_terminal_ours == NULL)
> fprintf_unfiltered (gdb_stderr, "Quit\n");
> else
> fprintf_unfiltered (gdb_stderr,
> "Quit (expect signal SIGINT when the program is resumed)\n");
> #endif
> return_to_top_level (RETURN_QUIT);
> }
>
> -
> - #if defined(_MSC_VER) /* should test for wingdb instead? */
> -
> - /*
> - * Windows translates all keyboard and mouse events
> - * into a message which is appended to the message
> - * queue for the process.
> - */
> -
> void
> notice_quit (void)
> {
> - int k = win32pollquit ();
> - if (k == 1)
> - quit_flag = 1;
> - else if (k == 2)
> - immediate_quit = 1;
> - }
> -
> - #else /* !defined(_MSC_VER) */
> -
> - void
> - notice_quit (void)
> - {
> /* Done by signals */
> }
> -
> - #endif /* !defined(_MSC_VER) */
>
> /* Control C comes here */
> void
> request_quit (int signo)
> {
> quit_flag = 1;
> /* Restore the signal handler. Harmless with BSD-style signals, needed
> for System V-style signals. So just always do it, rather than worrying
> about USG defines and stuff like that. */
> signal (signo, request_quit);
>
> #ifdef REQUEST_QUIT
> REQUEST_QUIT;
> #else
> if (immediate_quit)
> quit ();
> #endif
> }
> \f
> /* Memory management stuff (malloc friends). */
> --- 851,895 ----
> Index: values.c
> ===================================================================
> RCS file: /cvs/uberbaum/gdb/values.c,v
> retrieving revision 1.17
> diff -c -2 -0 -p -r1.17 values.c
> *** values.c 2001/05/21 20:08:59 1.17
> --- values.c 2001/05/30 21:35:03
> *************** unpack_double (struct type *type, char *
> *** 678,723 ****
>
> *invp = 0; /* Assume valid. */
> CHECK_TYPEDEF (type);
> code = TYPE_CODE (type);
> len = TYPE_LENGTH (type);
> nosign = TYPE_UNSIGNED (type);
> if (code == TYPE_CODE_FLT)
> {
> #ifdef INVALID_FLOAT
> if (INVALID_FLOAT (valaddr, len))
> {
> *invp = 1;
> return 1.234567891011121314;
> }
> #endif
> return extract_floating (valaddr, len);
> }
> else if (nosign)
> {
> /* Unsigned -- be sure we compensate for signed LONGEST. */
> - #if !defined (_MSC_VER) || (_MSC_VER > 900)
> return (ULONGEST) unpack_long (type, valaddr);
> - #else
> - /* FIXME!!! msvc22 doesn't support unsigned __int64 -> double */
> - return (LONGEST) unpack_long (type, valaddr);
> - #endif /* _MSC_VER */
> }
> else
> {
> /* Signed -- we are OK with unpack_long. */
> return unpack_long (type, valaddr);
> }
> }
>
> /* Unpack raw data (copied from debugee, target byte order) at VALADDR
> as a CORE_ADDR, assuming the raw data is described by type TYPE.
> We don't assume any alignment for the raw data. Return value is in
> host byte order.
>
> If you want functions and arrays to be coerced to pointers, and
> references to be dereferenced, call value_as_pointer() instead.
>
> C++: It is assumed that the front-end has taken care of
> all matters concerning pointers to members. A pointer
> to member which reaches here is considered to be equivalent
> to an INT (or some size). After all, it is only an offset. */
> --- 678,718 ----
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA?] Windows cleanup
2001-06-06 5:12 ` Andrew Cagney
2001-06-06 6:42 ` Eli Zaretskii
@ 2001-06-10 9:29 ` Christopher Faylor
1 sibling, 0 replies; 10+ messages in thread
From: Christopher Faylor @ 2001-06-10 9:29 UTC (permalink / raw)
To: gdb-patches
On Wed, Jun 06, 2001 at 08:12:51AM -0400, Andrew Cagney wrote:
>> I think that all of these qualify as obvious fixes
>
>Yes, the changes were proposed, discussed and then, eventually,
>consensus reached. The important step being ``discussed''. This leaves
>the actual changes as ``obvious'' :-)
Ok. These have been checked in.
cgf
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2001-06-10 9:29 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-30 20:22 [RFA?] Windows cleanup Christopher Faylor
2001-05-31 7:29 ` Eli Zaretskii
2001-05-31 16:40 ` Christopher Faylor
2001-05-31 19:29 ` Fernando Nasser
2001-05-31 22:42 ` Eli Zaretskii
2001-06-01 7:31 ` Christopher Faylor
2001-06-06 5:12 ` Andrew Cagney
2001-06-06 6:42 ` Eli Zaretskii
2001-06-10 9:29 ` Christopher Faylor
2001-06-06 10:29 ` Elena Zannoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox