mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-15 05:01:13 +08:00
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:
@ -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>
|
2005-05-26 Andrew Cagney <cagney@gnu.org>
|
||||||
|
|
||||||
* command.h (add_setshow_integer_cmd): Make VAR an integer.
|
* command.h (add_setshow_integer_cmd): Make VAR an integer.
|
||||||
|
@ -650,7 +650,9 @@ static void
|
|||||||
list_command (char *arg, int from_tty)
|
list_command (char *arg, int from_tty)
|
||||||
{
|
{
|
||||||
struct symtabs_and_lines sals, sals_end;
|
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;
|
struct symbol *sym;
|
||||||
char *arg1;
|
char *arg1;
|
||||||
int no_end = 1;
|
int no_end = 1;
|
||||||
|
@ -216,7 +216,7 @@ get_java_utf8_name (struct obstack *obstack, struct value *name)
|
|||||||
+ TYPE_LENGTH (value_type (temp));
|
+ TYPE_LENGTH (value_type (temp));
|
||||||
chrs = obstack_alloc (obstack, name_length + 1);
|
chrs = obstack_alloc (obstack, name_length + 1);
|
||||||
chrs[name_length] = '\0';
|
chrs[name_length] = '\0';
|
||||||
read_memory (data_addr, chrs, name_length);
|
read_memory (data_addr, (gdb_byte *) chrs, name_length);
|
||||||
return chrs;
|
return chrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -883,7 +883,7 @@ evaluate_subexp_java (struct type *expect_type, struct expression *exp,
|
|||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
long length, index;
|
long length, index;
|
||||||
struct type *el_type;
|
struct type *el_type;
|
||||||
char buf4[4];
|
gdb_byte buf4[4];
|
||||||
|
|
||||||
struct value *clas = java_class_from_object (arg1);
|
struct value *clas = java_class_from_object (arg1);
|
||||||
struct value *temp = clas;
|
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
|
if (TYPE_CODE (type) == TYPE_CODE_STRUCT && name != NULL
|
||||||
&& (i = strlen (name), name[i - 1] == ']'))
|
&& (i = strlen (name), name[i - 1] == ']'))
|
||||||
{
|
{
|
||||||
char buf4[4];
|
gdb_byte buf4[4];
|
||||||
long length;
|
long length;
|
||||||
unsigned int things_printed = 0;
|
unsigned int things_printed = 0;
|
||||||
int reps;
|
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)
|
while (i < length && things_printed < print_max)
|
||||||
{
|
{
|
||||||
char *buf;
|
gdb_byte *buf;
|
||||||
|
|
||||||
buf = alloca (TARGET_PTR_BIT / HOST_CHAR_BIT);
|
buf = alloca (TARGET_PTR_BIT / HOST_CHAR_BIT);
|
||||||
fputs_filtered (", ", stream);
|
fputs_filtered (", ", stream);
|
||||||
|
@ -73,7 +73,7 @@ is_scmvalue_type (struct type *type)
|
|||||||
LONGEST
|
LONGEST
|
||||||
scm_get_field (LONGEST svalue, int index)
|
scm_get_field (LONGEST svalue, int index)
|
||||||
{
|
{
|
||||||
char buffer[20];
|
gdb_byte buffer[20];
|
||||||
read_memory (SCM2PTR (svalue) + index * TYPE_LENGTH (builtin_type_scm),
|
read_memory (SCM2PTR (svalue) + index * TYPE_LENGTH (builtin_type_scm),
|
||||||
buffer, TYPE_LENGTH (builtin_type_scm));
|
buffer, TYPE_LENGTH (builtin_type_scm));
|
||||||
return extract_signed_integer (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). */
|
or Boolean (CONTEXT == TYPE_CODE_BOOL). */
|
||||||
|
|
||||||
LONGEST
|
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))
|
if (is_scmvalue_type (type))
|
||||||
{
|
{
|
||||||
@ -157,7 +157,7 @@ scm_lookup_name (char *str)
|
|||||||
struct symbol *sym;
|
struct symbol *sym;
|
||||||
args[0] = value_allocate_space_in_inferior (len);
|
args[0] = value_allocate_space_in_inferior (len);
|
||||||
args[1] = value_from_longest (builtin_type_int, 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 ()
|
if (in_eval_c ()
|
||||||
&& (sym = lookup_symbol ("env",
|
&& (sym = lookup_symbol ("env",
|
||||||
@ -189,9 +189,9 @@ scm_evaluate_string (char *str, int len)
|
|||||||
struct value *func;
|
struct value *func;
|
||||||
struct value *addr = value_allocate_space_in_inferior (len + 1);
|
struct value *addr = value_allocate_space_in_inferior (len + 1);
|
||||||
LONGEST iaddr = value_as_long (addr);
|
LONGEST iaddr = value_as_long (addr);
|
||||||
write_memory (iaddr, str, len);
|
write_memory (iaddr, (gdb_byte *) str, len);
|
||||||
/* FIXME - should find and pass env */
|
/* 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");
|
func = find_function_in_inferior ("scm_evstr");
|
||||||
return call_function_by_hand (func, 1, &addr);
|
return call_function_by_hand (func, 1, &addr);
|
||||||
}
|
}
|
||||||
|
@ -69,4 +69,4 @@ extern struct type *builtin_type_scm;
|
|||||||
|
|
||||||
extern int scm_parse (void);
|
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 i;
|
||||||
int done = 0;
|
int done = 0;
|
||||||
int buf_size;
|
int buf_size;
|
||||||
char buffer[64];
|
gdb_byte buffer[64];
|
||||||
int truncate = print_max && len > (int) print_max;
|
int truncate = print_max && len > (int) print_max;
|
||||||
if (truncate)
|
if (truncate)
|
||||||
len = print_max;
|
len = print_max;
|
||||||
@ -248,8 +248,8 @@ taloop:
|
|||||||
{
|
{
|
||||||
int len = SCM_LENGTH (svalue);
|
int len = SCM_LENGTH (svalue);
|
||||||
|
|
||||||
char *str = (char *) alloca (len);
|
char *str = alloca (len);
|
||||||
read_memory (SCM_CDR (svalue), str, len + 1);
|
read_memory (SCM_CDR (svalue), (gdb_byte *) str, len + 1);
|
||||||
/* Should handle weird characters FIXME */
|
/* Should handle weird characters FIXME */
|
||||||
str[len] = '\0';
|
str[len] = '\0';
|
||||||
fputs_filtered (str, stream);
|
fputs_filtered (str, stream);
|
||||||
|
@ -142,7 +142,7 @@ get_lines_to_list (void)
|
|||||||
struct symtab_and_line
|
struct symtab_and_line
|
||||||
get_current_source_symtab_and_line (void)
|
get_current_source_symtab_and_line (void)
|
||||||
{
|
{
|
||||||
struct symtab_and_line cursal;
|
struct symtab_and_line cursal = { };
|
||||||
|
|
||||||
cursal.symtab = current_source_symtab;
|
cursal.symtab = current_source_symtab;
|
||||||
cursal.line = current_source_line;
|
cursal.line = current_source_line;
|
||||||
@ -181,7 +181,7 @@ set_default_source_symtab_and_line (void)
|
|||||||
struct symtab_and_line
|
struct symtab_and_line
|
||||||
set_current_source_symtab_and_line (const struct symtab_and_line *sal)
|
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.symtab = current_source_symtab;
|
||||||
cursal.line = current_source_line;
|
cursal.line = current_source_line;
|
||||||
|
@ -552,7 +552,7 @@ tui_is_window_visible (enum tui_win_type type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
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))
|
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 CORE_ADDR tui_get_low_disassembly_address (CORE_ADDR, CORE_ADDR);
|
||||||
extern void tui_show_assembly (CORE_ADDR addr);
|
extern void tui_show_assembly (CORE_ADDR addr);
|
||||||
extern int tui_is_window_visible (enum tui_win_type type);
|
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
|
/* Initialize readline and configure the keymap for the switching
|
||||||
key shortcut. */
|
key shortcut. */
|
||||||
|
@ -2269,7 +2269,7 @@ check_field_in (struct type *type, const char *name)
|
|||||||
target structure/union is defined, otherwise, return 0. */
|
target structure/union is defined, otherwise, return 0. */
|
||||||
|
|
||||||
int
|
int
|
||||||
check_field (struct value *arg1, const gdb_byte *name)
|
check_field (struct value *arg1, const char *name)
|
||||||
{
|
{
|
||||||
struct type *t;
|
struct type *t;
|
||||||
|
|
||||||
|
@ -495,7 +495,7 @@ extern void print_variable_value (struct symbol *var,
|
|||||||
struct frame_info *frame,
|
struct frame_info *frame,
|
||||||
struct ui_file *stream);
|
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,
|
extern void typedef_print (struct type *type, struct symbol *news,
|
||||||
struct ui_file *stream);
|
struct ui_file *stream);
|
||||||
|
Reference in New Issue
Block a user