2007-11-01 20:24:20 +00:00
|
|
|
[base]
|
|
|
|
|
|
|
|
2007-10-14 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
|
|
|
|
Port to GDB-6.7.
|
|
|
|
|
|
|
|
Index: gdb-6.7/gdb/mi/mi-cmd-env.c
|
2006-07-11 06:33:02 +00:00
|
|
|
===================================================================
|
2007-11-01 20:24:20 +00:00
|
|
|
--- gdb-6.7.orig/gdb/mi/mi-cmd-env.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/mi/mi-cmd-env.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -78,7 +78,8 @@ mi_cmd_env_pwd (char *command, char **ar
|
|
|
|
|
|
|
|
/* Otherwise the mi level is 2 or higher. */
|
2005-03-22 23:25:26 +00:00
|
|
|
|
2007-11-01 20:24:20 +00:00
|
|
|
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
|
|
|
+ /* Unused result. */
|
|
|
|
+ 1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
|
|
|
ui_out_field_string (uiout, "cwd", gdb_dirbuf);
|
2005-03-22 23:25:26 +00:00
|
|
|
|
2007-11-01 20:24:20 +00:00
|
|
|
return MI_CMD_DONE;
|
|
|
|
Index: gdb-6.7/gdb/testsuite/gdb.base/move-dir.h
|
2006-07-11 06:33:02 +00:00
|
|
|
===================================================================
|
2007-11-01 20:24:20 +00:00
|
|
|
--- gdb-6.7.orig/gdb/testsuite/gdb.base/move-dir.h 2007-10-14 23:31:22.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/testsuite/gdb.base/move-dir.h 2007-10-14 23:42:39.000000000 +0200
|
2005-03-22 23:25:26 +00:00
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
-#include <stdlib.h>
|
|
|
|
+#include <stdio.h>
|
|
|
|
|
|
|
|
void other() {
|
|
|
|
const char* ostring = "other";
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/testsuite/gdb.base/sigrepeat.c
|
2006-07-11 06:33:02 +00:00
|
|
|
===================================================================
|
2007-11-01 20:24:20 +00:00
|
|
|
--- gdb-6.7.orig/gdb/testsuite/gdb.base/sigrepeat.c 2007-08-23 20:08:49.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/testsuite/gdb.base/sigrepeat.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -21,6 +21,7 @@
|
2006-07-11 06:33:02 +00:00
|
|
|
#include <stdlib.h>
|
2005-03-22 23:25:26 +00:00
|
|
|
#include <string.h>
|
|
|
|
#include <signal.h>
|
|
|
|
+#include <stdlib.h>
|
|
|
|
#include <sys/time.h>
|
|
|
|
|
2006-07-11 06:33:02 +00:00
|
|
|
static volatile int done[2];
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/s390-tdep.c
|
2006-07-11 06:33:02 +00:00
|
|
|
===================================================================
|
2007-11-01 20:24:20 +00:00
|
|
|
--- gdb-6.7.orig/gdb/s390-tdep.c 2007-10-02 21:26:42.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/s390-tdep.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -2214,6 +2214,9 @@ s390_return_value (struct gdbarch *gdbar
|
2006-07-11 18:04:22 +00:00
|
|
|
case RETURN_VALUE_STRUCT_CONVENTION:
|
|
|
|
error (_("Cannot set function return value."));
|
|
|
|
break;
|
|
|
|
+
|
|
|
|
+ default:
|
|
|
|
+ break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (out)
|
2007-11-01 20:24:20 +00:00
|
|
|
@@ -2246,6 +2249,9 @@ s390_return_value (struct gdbarch *gdbar
|
2005-03-22 23:25:26 +00:00
|
|
|
case RETURN_VALUE_STRUCT_CONVENTION:
|
2006-07-11 06:33:02 +00:00
|
|
|
error (_("Function return value unknown."));
|
2005-03-22 23:25:26 +00:00
|
|
|
break;
|
|
|
|
+
|
|
|
|
+ default:
|
|
|
|
+ break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/f-exp.y
|
2006-07-11 06:33:02 +00:00
|
|
|
===================================================================
|
2007-11-01 20:24:20 +00:00
|
|
|
--- gdb-6.7.orig/gdb/f-exp.y 2007-06-12 17:33:03.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/f-exp.y 2007-10-14 23:42:39.000000000 +0200
|
2006-07-11 06:33:02 +00:00
|
|
|
@@ -567,6 +567,8 @@ ptype : typebase
|
2005-03-22 23:25:26 +00:00
|
|
|
case tp_function:
|
|
|
|
follow_type = lookup_function_type (follow_type);
|
|
|
|
break;
|
|
|
|
+ default:
|
|
|
|
+ break;
|
|
|
|
}
|
|
|
|
$$ = follow_type;
|
|
|
|
}
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/source.c
|
2006-07-11 06:33:02 +00:00
|
|
|
===================================================================
|
2007-11-01 20:24:20 +00:00
|
|
|
--- gdb-6.7.orig/gdb/source.c 2007-08-23 20:08:38.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/source.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -170,7 +170,7 @@ get_current_source_symtab_and_line (void
|
2006-07-11 06:33:02 +00:00
|
|
|
void
|
|
|
|
set_default_source_symtab_and_line (void)
|
2005-03-22 23:25:26 +00:00
|
|
|
{
|
|
|
|
- struct symtab_and_line cursal;
|
|
|
|
+ struct symtab_and_line cursal = {0};
|
|
|
|
|
2006-07-11 06:33:02 +00:00
|
|
|
if (!have_full_symbols () && !have_partial_symbols ())
|
|
|
|
error (_("No symbol table is loaded. Use the \"file\" command."));
|
2007-11-01 20:24:20 +00:00
|
|
|
@@ -1439,7 +1439,7 @@ static void
|
2005-03-22 23:25:26 +00:00
|
|
|
line_info (char *arg, int from_tty)
|
|
|
|
{
|
|
|
|
struct symtabs_and_lines sals;
|
|
|
|
- struct symtab_and_line sal;
|
|
|
|
+ struct symtab_and_line sal = {0};
|
|
|
|
CORE_ADDR start_pc, end_pc;
|
|
|
|
int i;
|
|
|
|
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/linespec.c
|
2006-07-11 06:33:02 +00:00
|
|
|
===================================================================
|
2007-11-01 20:24:20 +00:00
|
|
|
--- gdb-6.7.orig/gdb/linespec.c 2007-10-14 23:31:03.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/linespec.c 2007-10-14 23:53:57.000000000 +0200
|
|
|
|
@@ -1654,7 +1654,7 @@ static struct symtabs_and_lines
|
2005-03-22 23:25:26 +00:00
|
|
|
find_method (int funfirstline, char ***canonical, char *saved_arg,
|
|
|
|
char *copy, struct type *t, struct symbol *sym_class)
|
|
|
|
{
|
|
|
|
- struct symtabs_and_lines values;
|
2007-11-01 20:24:20 +00:00
|
|
|
+ struct symtabs_and_lines values = { NULL };
|
|
|
|
struct symbol *sym = NULL;
|
2005-03-22 23:25:26 +00:00
|
|
|
int i1; /* Counter for the symbol array. */
|
|
|
|
struct symbol **sym_arr = alloca (total_number_of_methods (t)
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/gdb-events.c
|
2006-07-11 06:33:02 +00:00
|
|
|
===================================================================
|
2007-11-01 20:24:20 +00:00
|
|
|
--- gdb-6.7.orig/gdb/gdb-events.c 2007-08-23 20:08:31.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/gdb-events.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -319,6 +319,8 @@ gdb_events_deliver (struct gdb_events *v
|
2005-03-22 23:25:26 +00:00
|
|
|
case architecture_changed:
|
|
|
|
vector->architecture_changed ();
|
|
|
|
break;
|
|
|
|
+ default:
|
|
|
|
+ break;
|
|
|
|
}
|
|
|
|
delivering_events = event->next;
|
|
|
|
xfree (event);
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/dwarf2read.c
|
2006-07-11 06:33:02 +00:00
|
|
|
===================================================================
|
2007-11-01 20:24:20 +00:00
|
|
|
--- gdb-6.7.orig/gdb/dwarf2read.c 2007-10-14 23:31:22.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/dwarf2read.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -9585,6 +9585,7 @@ dwarf_decode_macros (struct line_header
|
2005-03-22 23:25:26 +00:00
|
|
|
for (;;)
|
|
|
|
{
|
|
|
|
enum dwarf_macinfo_record_type macinfo_type;
|
|
|
|
+ int tmp;
|
|
|
|
|
|
|
|
/* Do we at least have room for a macinfo type byte? */
|
|
|
|
if (mac_ptr >= mac_end)
|
2007-11-01 20:24:20 +00:00
|
|
|
@@ -9596,13 +9597,16 @@ dwarf_decode_macros (struct line_header
|
2005-03-22 23:25:26 +00:00
|
|
|
macinfo_type = read_1_byte (abfd, mac_ptr);
|
|
|
|
mac_ptr++;
|
|
|
|
|
|
|
|
+ /* Check for a zero macinfo type which indicates the end of the macro
|
|
|
|
+ information. We do this as the compiler may warn us if we
|
|
|
|
+ try and look for 0 in the switch below because 0 is not
|
|
|
|
+ an enumerated value. */
|
|
|
|
+ tmp = (int)macinfo_type;
|
|
|
|
+ if (tmp == 0)
|
|
|
|
+ return;
|
2006-07-11 06:33:02 +00:00
|
|
|
+
|
2005-03-22 23:25:26 +00:00
|
|
|
switch (macinfo_type)
|
|
|
|
{
|
|
|
|
- /* A zero macinfo type indicates the end of the macro
|
|
|
|
- information. */
|
|
|
|
- case 0:
|
|
|
|
- return;
|
|
|
|
-
|
|
|
|
case DW_MACINFO_define:
|
|
|
|
case DW_MACINFO_undef:
|
|
|
|
{
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/stabsread.c
|
2006-07-11 06:33:02 +00:00
|
|
|
===================================================================
|
2007-11-01 20:24:20 +00:00
|
|
|
--- gdb-6.7.orig/gdb/stabsread.c 2007-10-09 00:44:32.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/stabsread.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -1842,7 +1842,8 @@ again:
|
2005-03-22 23:25:26 +00:00
|
|
|
struct type *domain = read_type (pp, objfile);
|
|
|
|
struct type *return_type;
|
|
|
|
struct field *args;
|
|
|
|
- int nargs, varargs;
|
|
|
|
+ int nargs = 0;
|
|
|
|
+ int varargs = 0;
|
|
|
|
|
|
|
|
if (**pp != ',')
|
|
|
|
/* Invalid member type data format. */
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/dwarf2expr.c
|
2006-07-11 06:33:02 +00:00
|
|
|
===================================================================
|
2007-11-01 20:24:20 +00:00
|
|
|
--- gdb-6.7.orig/gdb/dwarf2expr.c 2007-08-23 20:08:28.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/dwarf2expr.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -594,6 +594,8 @@ execute_stack_op (struct dwarf_expr_cont
|
2005-03-22 23:25:26 +00:00
|
|
|
op_ptr = read_uleb128 (op_ptr, op_end, ®);
|
|
|
|
result += reg;
|
|
|
|
break;
|
|
|
|
+ default:
|
|
|
|
+ break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/varobj.c
|
2006-07-11 06:33:02 +00:00
|
|
|
===================================================================
|
2007-11-01 20:24:20 +00:00
|
|
|
--- gdb-6.7.orig/gdb/varobj.c 2007-10-13 05:29:58.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/varobj.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -347,8 +347,7 @@ static struct language_specific language
|
2005-03-22 23:25:26 +00:00
|
|
|
c_value_of_variable}
|
|
|
|
,
|
|
|
|
/* C */
|
|
|
|
- {
|
|
|
|
- vlang_c,
|
|
|
|
+ {vlang_c,
|
|
|
|
c_number_of_children,
|
|
|
|
c_name_of_variable,
|
|
|
|
c_name_of_child,
|
2007-11-01 20:24:20 +00:00
|
|
|
@@ -360,8 +359,7 @@ static struct language_specific language
|
2005-03-22 23:25:26 +00:00
|
|
|
c_value_of_variable}
|
|
|
|
,
|
|
|
|
/* C++ */
|
|
|
|
- {
|
|
|
|
- vlang_cplus,
|
|
|
|
+ {vlang_cplus,
|
|
|
|
cplus_number_of_children,
|
|
|
|
cplus_name_of_variable,
|
|
|
|
cplus_name_of_child,
|
2007-11-01 20:24:20 +00:00
|
|
|
@@ -373,8 +371,7 @@ static struct language_specific language
|
2005-03-22 23:25:26 +00:00
|
|
|
cplus_value_of_variable}
|
|
|
|
,
|
|
|
|
/* Java */
|
|
|
|
- {
|
|
|
|
- vlang_java,
|
|
|
|
+ {vlang_java,
|
|
|
|
java_number_of_children,
|
|
|
|
java_name_of_variable,
|
|
|
|
java_name_of_child,
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/doublest.c
|
2006-07-11 06:33:02 +00:00
|
|
|
===================================================================
|
2007-11-01 20:24:20 +00:00
|
|
|
--- gdb-6.7.orig/gdb/doublest.c 2007-08-23 20:08:28.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/doublest.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -92,15 +92,10 @@ get_field (const bfd_byte *data, enum fl
|
2006-07-11 06:33:02 +00:00
|
|
|
{
|
|
|
|
result |= (unsigned long)*(data + cur_byte) << cur_bitshift;
|
|
|
|
cur_bitshift += FLOATFORMAT_CHAR_BIT;
|
|
|
|
- switch (order)
|
|
|
|
- {
|
|
|
|
- case floatformat_little:
|
|
|
|
- ++cur_byte;
|
|
|
|
- break;
|
|
|
|
- case floatformat_big:
|
|
|
|
- --cur_byte;
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
+ if (order == floatformat_little)
|
|
|
|
+ ++cur_byte;
|
|
|
|
+ else
|
|
|
|
+ --cur_byte;
|
|
|
|
}
|
|
|
|
if (len < sizeof(result) * FLOATFORMAT_CHAR_BIT)
|
|
|
|
/* Mask out bits which are not part of the field */
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/cli/cli-cmds.c
|
|
|
|
===================================================================
|
|
|
|
--- gdb-6.7.orig/gdb/cli/cli-cmds.c 2007-08-23 20:08:47.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/cli/cli-cmds.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -320,7 +320,8 @@ pwd_command (char *args, int from_tty)
|
2007-04-24 15:57:25 +00:00
|
|
|
{
|
|
|
|
if (args)
|
|
|
|
error (_("The \"pwd\" command does not take an argument: %s"), args);
|
|
|
|
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
|
|
|
+ /* Unused result. */
|
|
|
|
+ 1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
|
|
|
|
|
|
|
if (strcmp (gdb_dirbuf, current_directory) != 0)
|
|
|
|
printf_unfiltered (_("Working directory %s\n (canonically %s).\n"),
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/inflow.c
|
|
|
|
===================================================================
|
|
|
|
--- gdb-6.7.orig/gdb/inflow.c 2007-08-23 20:08:35.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/inflow.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -547,17 +547,20 @@ new_tty (void)
|
2007-04-24 15:57:25 +00:00
|
|
|
if (tty != 0)
|
|
|
|
{
|
|
|
|
close (0);
|
|
|
|
- dup (tty);
|
|
|
|
+ /* Unused result. */
|
|
|
|
+ 1 && dup (tty);
|
|
|
|
}
|
|
|
|
if (tty != 1)
|
|
|
|
{
|
|
|
|
close (1);
|
|
|
|
- dup (tty);
|
|
|
|
+ /* Unused result. */
|
|
|
|
+ 1 && dup (tty);
|
|
|
|
}
|
|
|
|
if (tty != 2)
|
|
|
|
{
|
|
|
|
close (2);
|
|
|
|
- dup (tty);
|
|
|
|
+ /* Unused result. */
|
|
|
|
+ 1 && dup (tty);
|
|
|
|
}
|
|
|
|
if (tty > 2)
|
|
|
|
close (tty);
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/linux-nat.c
|
|
|
|
===================================================================
|
|
|
|
--- gdb-6.7.orig/gdb/linux-nat.c 2007-10-14 23:31:22.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/linux-nat.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -2895,7 +2895,8 @@ linux_nat_info_proc_cmd (char *args, int
|
2007-04-24 15:57:25 +00:00
|
|
|
sprintf (fname1, "/proc/%lld/cmdline", pid);
|
2007-11-01 20:24:20 +00:00
|
|
|
if ((procfile = fopen (fname1, "r")) != NULL)
|
2007-04-24 15:57:25 +00:00
|
|
|
{
|
|
|
|
- fgets (buffer, sizeof (buffer), procfile);
|
|
|
|
+ /* Unused result. */
|
|
|
|
+ 1 && fgets (buffer, sizeof (buffer), procfile);
|
|
|
|
printf_filtered ("cmdline = '%s'\n", buffer);
|
|
|
|
fclose (procfile);
|
|
|
|
}
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/main.c
|
|
|
|
===================================================================
|
|
|
|
--- gdb-6.7.orig/gdb/main.c 2007-08-23 20:08:36.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/main.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -193,7 +193,8 @@ captured_main (void *data)
|
2007-04-24 15:57:25 +00:00
|
|
|
line[0] = '\0'; /* Terminate saved (now empty) cmd line */
|
|
|
|
instream = stdin;
|
|
|
|
|
|
|
|
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
|
|
|
+ /* Unused result. */
|
|
|
|
+ 1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
|
|
|
current_directory = gdb_dirbuf;
|
|
|
|
|
|
|
|
gdb_stdout = stdio_fileopen (stdout);
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/top.c
|
|
|
|
===================================================================
|
|
|
|
--- gdb-6.7.orig/gdb/top.c 2007-10-14 23:38:27.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/top.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -1636,7 +1636,8 @@ gdb_init (char *argv0)
|
2007-04-24 15:57:25 +00:00
|
|
|
|
|
|
|
/* Run the init function of each source file */
|
|
|
|
|
|
|
|
- getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
|
|
|
+ /* Unused result. */
|
|
|
|
+ 1 && getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
|
|
|
|
current_directory = gdb_dirbuf;
|
|
|
|
|
|
|
|
#ifdef __MSDOS__
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/ui-file.c
|
|
|
|
===================================================================
|
|
|
|
--- gdb-6.7.orig/gdb/ui-file.c 2007-08-23 20:08:46.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/ui-file.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -480,7 +480,8 @@ stdio_file_write (struct ui_file *file,
|
2007-04-24 15:57:25 +00:00
|
|
|
if (stdio->magic != &stdio_file_magic)
|
|
|
|
internal_error (__FILE__, __LINE__,
|
|
|
|
_("stdio_file_write: bad magic number"));
|
|
|
|
- fwrite (buf, length_buf, 1, stdio->file);
|
|
|
|
+ /* Unused result. */
|
|
|
|
+ 1 && fwrite (buf, length_buf, 1, stdio->file);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/utils.c
|
|
|
|
===================================================================
|
|
|
|
--- gdb-6.7.orig/gdb/utils.c 2007-08-23 20:08:46.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/utils.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -716,7 +716,8 @@ internal_vproblem (struct internal_probl
|
2007-04-24 15:57:25 +00:00
|
|
|
abort (); /* NOTE: GDB has only three calls to abort(). */
|
|
|
|
default:
|
|
|
|
dejavu = 3;
|
|
|
|
- write (STDERR_FILENO, msg, sizeof (msg));
|
|
|
|
+ /* Unused result. */
|
|
|
|
+ 1 && write (STDERR_FILENO, msg, sizeof (msg));
|
|
|
|
exit (1);
|
|
|
|
}
|
|
|
|
}
|
2007-11-01 20:24:20 +00:00
|
|
|
Index: gdb-6.7/gdb/gdbserver/gdbreplay.c
|
|
|
|
===================================================================
|
|
|
|
--- gdb-6.7.orig/gdb/gdbserver/gdbreplay.c 2007-08-23 20:08:48.000000000 +0200
|
|
|
|
+++ gdb-6.7/gdb/gdbserver/gdbreplay.c 2007-10-14 23:42:39.000000000 +0200
|
|
|
|
@@ -356,7 +356,12 @@ expect (FILE *fp)
|
2007-08-08 22:02:39 +00:00
|
|
|
{
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
- read (remote_desc, &fromgdb, 1);
|
|
|
|
+ if (read (remote_desc, &fromgdb, 1) != 1)
|
|
|
|
+ {
|
|
|
|
+ /* Error gets reported below. */
|
|
|
|
+ fromlog = 0;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
while (fromlog == fromgdb);
|
|
|
|
if (fromlog != EOL)
|
2007-11-01 20:24:20 +00:00
|
|
|
@@ -383,7 +388,11 @@ play (FILE *fp)
|
2007-08-08 22:02:39 +00:00
|
|
|
while ((fromlog = logchar (fp)) != EOL)
|
|
|
|
{
|
|
|
|
ch = fromlog;
|
|
|
|
- write (remote_desc, &ch, 1);
|
|
|
|
+ if (write (remote_desc, &ch, 1) != 1)
|
|
|
|
+ {
|
|
|
|
+ sync_error (fp, "Sync error during write of gdb packet", ch, 0);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|