* 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-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.
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;
+ 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;
}
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;
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;
while (i < length && things_printed < print_max)
{
- char *buf;
+ gdb_byte *buf;
buf = alloca (TARGET_PTR_BIT / HOST_CHAR_BIT);
fputs_filtered (", ", stream);
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));
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))
{
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",
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);
}
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);
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;
{
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);
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;
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;
}
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))
{
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. */
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;
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);