2005-05-27 Andrew Cagney <cagney@gnu.org>
* jv-lang.c (get_java_utf8_name): Add cast. (evaluate_subexp_java): Use gdb_byte for buffers. * jv-valprint.c (java_value_print, java_value_print): Use gdb_byte for buffers. * scm-lang.c (scm_get_field, scm_unpack) (scm_evaluate_string): Use gdb_byte for buffers. (scm_lookup_name): Add cast. * scm-valprint.c (scm_scmval_print, scm_scmval_print): Use gdb_byte for buffers. * tui/tui.h (tui_get_command_dimension): Make parameters unsigned. * tui/tui.c (tui_get_command_dimension): Make parameters unsigned. * value.h (check_field): Change "name" to a string. * valops.c (check_field): Change "name" to a string. * scm-lang.h (scm_parse): Use gdb_byte for buffers. * source.c (get_current_source_symtab_and_line) (set_current_source_symtab_and_line): Initialize all fields of sal structures. * cli/cli-cmds.c (list_command): Use gdb_byte for buffers.
This commit is contained in:
parent
b4d165ff8c
commit
c68a6671d7
12 changed files with 44 additions and 20 deletions
|
@ -1,3 +1,24 @@
|
|||
2005-05-27 Andrew Cagney <cagney@gnu.org>
|
||||
|
||||
* jv-lang.c (get_java_utf8_name): Add cast.
|
||||
(evaluate_subexp_java): Use gdb_byte for buffers.
|
||||
* jv-valprint.c (java_value_print, java_value_print): Use gdb_byte
|
||||
for buffers.
|
||||
* scm-lang.c (scm_get_field, scm_unpack)
|
||||
(scm_evaluate_string): Use gdb_byte for buffers.
|
||||
(scm_lookup_name): Add cast.
|
||||
* scm-valprint.c (scm_scmval_print, scm_scmval_print): Use
|
||||
gdb_byte for buffers.
|
||||
* tui/tui.h (tui_get_command_dimension): Make parameters unsigned.
|
||||
* tui/tui.c (tui_get_command_dimension): Make parameters unsigned.
|
||||
* value.h (check_field): Change "name" to a string.
|
||||
* valops.c (check_field): Change "name" to a string.
|
||||
* scm-lang.h (scm_parse): Use gdb_byte for buffers.
|
||||
* source.c (get_current_source_symtab_and_line)
|
||||
(set_current_source_symtab_and_line): Initialize all fields of sal
|
||||
structures.
|
||||
* cli/cli-cmds.c (list_command): Use gdb_byte for buffers.
|
||||
|
||||
2005-05-26 Andrew Cagney <cagney@gnu.org>
|
||||
|
||||
* command.h (add_setshow_integer_cmd): Make VAR an integer.
|
||||
|
|
|
@ -650,7 +650,9 @@ static void
|
|||
list_command (char *arg, int from_tty)
|
||||
{
|
||||
struct symtabs_and_lines sals, sals_end;
|
||||
struct symtab_and_line sal, sal_end, cursal;
|
||||
struct symtab_and_line sal = { };
|
||||
struct symtab_and_line sal_end = { };
|
||||
struct symtab_and_line cursal = { };
|
||||
struct symbol *sym;
|
||||
char *arg1;
|
||||
int no_end = 1;
|
||||
|
|
|
@ -216,7 +216,7 @@ get_java_utf8_name (struct obstack *obstack, struct value *name)
|
|||
+ TYPE_LENGTH (value_type (temp));
|
||||
chrs = obstack_alloc (obstack, name_length + 1);
|
||||
chrs[name_length] = '\0';
|
||||
read_memory (data_addr, chrs, name_length);
|
||||
read_memory (data_addr, (gdb_byte *) chrs, name_length);
|
||||
return chrs;
|
||||
}
|
||||
|
||||
|
@ -883,7 +883,7 @@ evaluate_subexp_java (struct type *expect_type, struct expression *exp,
|
|||
CORE_ADDR address;
|
||||
long length, index;
|
||||
struct type *el_type;
|
||||
char buf4[4];
|
||||
gdb_byte buf4[4];
|
||||
|
||||
struct value *clas = java_class_from_object (arg1);
|
||||
struct value *temp = clas;
|
||||
|
|
|
@ -72,7 +72,7 @@ java_value_print (struct value *val, struct ui_file *stream, int format,
|
|||
if (TYPE_CODE (type) == TYPE_CODE_STRUCT && name != NULL
|
||||
&& (i = strlen (name), name[i - 1] == ']'))
|
||||
{
|
||||
char buf4[4];
|
||||
gdb_byte buf4[4];
|
||||
long length;
|
||||
unsigned int things_printed = 0;
|
||||
int reps;
|
||||
|
@ -93,7 +93,7 @@ java_value_print (struct value *val, struct ui_file *stream, int format,
|
|||
|
||||
while (i < length && things_printed < print_max)
|
||||
{
|
||||
char *buf;
|
||||
gdb_byte *buf;
|
||||
|
||||
buf = alloca (TARGET_PTR_BIT / HOST_CHAR_BIT);
|
||||
fputs_filtered (", ", stream);
|
||||
|
|
|
@ -73,7 +73,7 @@ is_scmvalue_type (struct type *type)
|
|||
LONGEST
|
||||
scm_get_field (LONGEST svalue, int index)
|
||||
{
|
||||
char buffer[20];
|
||||
gdb_byte buffer[20];
|
||||
read_memory (SCM2PTR (svalue) + index * TYPE_LENGTH (builtin_type_scm),
|
||||
buffer, TYPE_LENGTH (builtin_type_scm));
|
||||
return extract_signed_integer (buffer, TYPE_LENGTH (builtin_type_scm));
|
||||
|
@ -84,7 +84,7 @@ scm_get_field (LONGEST svalue, int index)
|
|||
or Boolean (CONTEXT == TYPE_CODE_BOOL). */
|
||||
|
||||
LONGEST
|
||||
scm_unpack (struct type *type, const char *valaddr, enum type_code context)
|
||||
scm_unpack (struct type *type, const gdb_byte *valaddr, enum type_code context)
|
||||
{
|
||||
if (is_scmvalue_type (type))
|
||||
{
|
||||
|
@ -157,7 +157,7 @@ scm_lookup_name (char *str)
|
|||
struct symbol *sym;
|
||||
args[0] = value_allocate_space_in_inferior (len);
|
||||
args[1] = value_from_longest (builtin_type_int, len);
|
||||
write_memory (value_as_long (args[0]), str, len);
|
||||
write_memory (value_as_long (args[0]), (gdb_byte *) str, len);
|
||||
|
||||
if (in_eval_c ()
|
||||
&& (sym = lookup_symbol ("env",
|
||||
|
@ -189,9 +189,9 @@ scm_evaluate_string (char *str, int len)
|
|||
struct value *func;
|
||||
struct value *addr = value_allocate_space_in_inferior (len + 1);
|
||||
LONGEST iaddr = value_as_long (addr);
|
||||
write_memory (iaddr, str, len);
|
||||
write_memory (iaddr, (gdb_byte *) str, len);
|
||||
/* FIXME - should find and pass env */
|
||||
write_memory (iaddr + len, "", 1);
|
||||
write_memory (iaddr + len, (gdb_byte *) "", 1);
|
||||
func = find_function_in_inferior ("scm_evstr");
|
||||
return call_function_by_hand (func, 1, &addr);
|
||||
}
|
||||
|
|
|
@ -69,4 +69,4 @@ extern struct type *builtin_type_scm;
|
|||
|
||||
extern int scm_parse (void);
|
||||
|
||||
extern LONGEST scm_unpack (struct type *, const char *, enum type_code);
|
||||
extern LONGEST scm_unpack (struct type *, const gdb_byte *, enum type_code);
|
||||
|
|
|
@ -220,7 +220,7 @@ taloop:
|
|||
int i;
|
||||
int done = 0;
|
||||
int buf_size;
|
||||
char buffer[64];
|
||||
gdb_byte buffer[64];
|
||||
int truncate = print_max && len > (int) print_max;
|
||||
if (truncate)
|
||||
len = print_max;
|
||||
|
@ -248,8 +248,8 @@ taloop:
|
|||
{
|
||||
int len = SCM_LENGTH (svalue);
|
||||
|
||||
char *str = (char *) alloca (len);
|
||||
read_memory (SCM_CDR (svalue), str, len + 1);
|
||||
char *str = alloca (len);
|
||||
read_memory (SCM_CDR (svalue), (gdb_byte *) str, len + 1);
|
||||
/* Should handle weird characters FIXME */
|
||||
str[len] = '\0';
|
||||
fputs_filtered (str, stream);
|
||||
|
|
|
@ -142,7 +142,7 @@ get_lines_to_list (void)
|
|||
struct symtab_and_line
|
||||
get_current_source_symtab_and_line (void)
|
||||
{
|
||||
struct symtab_and_line cursal;
|
||||
struct symtab_and_line cursal = { };
|
||||
|
||||
cursal.symtab = current_source_symtab;
|
||||
cursal.line = current_source_line;
|
||||
|
@ -181,7 +181,7 @@ set_default_source_symtab_and_line (void)
|
|||
struct symtab_and_line
|
||||
set_current_source_symtab_and_line (const struct symtab_and_line *sal)
|
||||
{
|
||||
struct symtab_and_line cursal;
|
||||
struct symtab_and_line cursal = { };
|
||||
|
||||
cursal.symtab = current_source_symtab;
|
||||
cursal.line = current_source_line;
|
||||
|
|
|
@ -552,7 +552,7 @@ tui_is_window_visible (enum tui_win_type type)
|
|||
}
|
||||
|
||||
int
|
||||
tui_get_command_dimension (int *width, int *height)
|
||||
tui_get_command_dimension (unsigned int *width, unsigned int *height)
|
||||
{
|
||||
if (!tui_active || (TUI_CMD_WIN == NULL))
|
||||
{
|
||||
|
|
|
@ -59,7 +59,8 @@ enum tui_win_type
|
|||
extern CORE_ADDR tui_get_low_disassembly_address (CORE_ADDR, CORE_ADDR);
|
||||
extern void tui_show_assembly (CORE_ADDR addr);
|
||||
extern int tui_is_window_visible (enum tui_win_type type);
|
||||
extern int tui_get_command_dimension (int *width, int *height);
|
||||
extern int tui_get_command_dimension (unsigned int *width,
|
||||
unsigned int *height);
|
||||
|
||||
/* Initialize readline and configure the keymap for the switching
|
||||
key shortcut. */
|
||||
|
|
|
@ -2269,7 +2269,7 @@ check_field_in (struct type *type, const char *name)
|
|||
target structure/union is defined, otherwise, return 0. */
|
||||
|
||||
int
|
||||
check_field (struct value *arg1, const gdb_byte *name)
|
||||
check_field (struct value *arg1, const char *name)
|
||||
{
|
||||
struct type *t;
|
||||
|
||||
|
|
|
@ -495,7 +495,7 @@ extern void print_variable_value (struct symbol *var,
|
|||
struct frame_info *frame,
|
||||
struct ui_file *stream);
|
||||
|
||||
extern int check_field (struct value *, const gdb_byte *);
|
||||
extern int check_field (struct value *, const char *);
|
||||
|
||||
extern void typedef_print (struct type *type, struct symbol *news,
|
||||
struct ui_file *stream);
|
||||
|
|
Loading…
Reference in a new issue