mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-15 03:48:11 +08:00
* thread.c: cull duplicate prototypes. Move prototypes to top.
* serial.c: indentation cleanup. * breakpoint.c: add casts to eliminate compiler warnings.
This commit is contained in:
@ -665,7 +665,8 @@ insert_breakpoints ()
|
|||||||
/* Bp set, now make sure callbacks are enabled */
|
/* Bp set, now make sure callbacks are enabled */
|
||||||
args.kind = b->type == bp_catch_catch ? EX_EVENT_CATCH : EX_EVENT_THROW;
|
args.kind = b->type == bp_catch_catch ? EX_EVENT_CATCH : EX_EVENT_THROW;
|
||||||
args.enable = 1;
|
args.enable = 1;
|
||||||
sal = catch_errors ((int (*) PARAMS ((char *))) cover_target_enable_exception_callback,
|
sal = catch_errors ((int (*) PARAMS ((char *)))
|
||||||
|
cover_target_enable_exception_callback,
|
||||||
(char *) &args,
|
(char *) &args,
|
||||||
message, RETURN_MASK_ALL);
|
message, RETURN_MASK_ALL);
|
||||||
if (sal && (sal != (struct symtab_and_line *) -1))
|
if (sal && (sal != (struct symtab_and_line *) -1))
|
||||||
@ -914,7 +915,7 @@ update_breakpoints_after_exec ()
|
|||||||
(b->type == bp_catch_vfork) ||
|
(b->type == bp_catch_vfork) ||
|
||||||
(b->type == bp_catch_fork))
|
(b->type == bp_catch_fork))
|
||||||
{
|
{
|
||||||
b->address = NULL;
|
b->address = (CORE_ADDR) NULL;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -959,7 +960,7 @@ update_breakpoints_after_exec ()
|
|||||||
/* If this breakpoint has survived the above battery of checks, then
|
/* If this breakpoint has survived the above battery of checks, then
|
||||||
it must have a symbolic address. Be sure that it gets reevaluated
|
it must have a symbolic address. Be sure that it gets reevaluated
|
||||||
to a target address, rather than reusing the old evaluation. */
|
to a target address, rather than reusing the old evaluation. */
|
||||||
b->address = NULL;
|
b->address = (CORE_ADDR) NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
24
gdb/serial.c
24
gdb/serial.c
@ -508,17 +508,19 @@ _initialize_serial ()
|
|||||||
Use <CR>~. or <CR>~^D to break out.");
|
Use <CR>~. or <CR>~^D to break out.");
|
||||||
#endif /* 0 */
|
#endif /* 0 */
|
||||||
|
|
||||||
add_show_from_set (add_set_cmd ("remotelogfile", no_class,
|
add_show_from_set
|
||||||
var_filename, (char *)&serial_logfile,
|
(add_set_cmd ("remotelogfile", no_class,
|
||||||
"Set filename for remote session recording.\n\
|
var_filename, (char *) &serial_logfile,
|
||||||
|
"Set filename for remote session recording.\n\
|
||||||
This file is used to record the remote session for future playback\n\
|
This file is used to record the remote session for future playback\n\
|
||||||
by gdbserver.", &setlist),
|
by gdbserver.",
|
||||||
&showlist);
|
&setlist),
|
||||||
|
&showlist);
|
||||||
|
|
||||||
add_show_from_set (add_set_enum_cmd ("remotelogbase", no_class,
|
add_show_from_set
|
||||||
logbase_enums,
|
(add_set_enum_cmd ("remotelogbase", no_class,
|
||||||
(char *)&serial_logbase,
|
logbase_enums, (char *) &serial_logbase,
|
||||||
"Set numerical base for remote session logging",
|
"Set numerical base for remote session logging",
|
||||||
&setlist),
|
&setlist),
|
||||||
&showlist);
|
&showlist);
|
||||||
}
|
}
|
||||||
|
87
gdb/thread.c
87
gdb/thread.c
@ -73,6 +73,35 @@ struct thread_info
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Prototypes for exported functions. */
|
||||||
|
|
||||||
|
void _initialize_thread PARAMS ((void));
|
||||||
|
|
||||||
|
/* Prototypes for local functions. */
|
||||||
|
|
||||||
|
#if !defined(FIND_NEW_THREADS)
|
||||||
|
#define FIND_NEW_THREADS target_find_new_threads
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static struct thread_info *thread_list = NULL;
|
||||||
|
static int highest_thread_num;
|
||||||
|
|
||||||
|
static struct thread_info * find_thread_id PARAMS ((int num));
|
||||||
|
|
||||||
|
static void thread_command PARAMS ((char * tidstr, int from_tty));
|
||||||
|
static void thread_apply_all_command PARAMS ((char *, int));
|
||||||
|
static int thread_alive PARAMS ((struct thread_info *));
|
||||||
|
static void info_threads_command PARAMS ((char *, int));
|
||||||
|
static void thread_apply_command PARAMS ((char *, int));
|
||||||
|
static void restore_current_thread PARAMS ((int));
|
||||||
|
static void switch_to_thread PARAMS ((int pid));
|
||||||
|
static void prune_threads PARAMS ((void));
|
||||||
|
|
||||||
|
/* If the host has threads, the host machine definition may set this
|
||||||
|
macro. But, for remote thread debugging, it gets more complex and
|
||||||
|
setting macros does not bind to the various target dependent
|
||||||
|
methods well. So, we use the vector target_thread_functions */
|
||||||
|
|
||||||
static struct target_thread_vector *target_thread_functions;
|
static struct target_thread_vector *target_thread_functions;
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -87,10 +116,9 @@ target_find_new_threads ()
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
target_get_thread_info PARAMS ((
|
target_get_thread_info PARAMS ((gdb_threadref * ref,
|
||||||
gdb_threadref * ref,
|
int selection, /* FIXME: Selection */
|
||||||
int selection, /* FIXME: Selection */
|
struct gdb_ext_thread_info * info));
|
||||||
struct gdb_ext_thread_info * info));
|
|
||||||
|
|
||||||
int
|
int
|
||||||
target_get_thread_info (ref, selection, info)
|
target_get_thread_info (ref, selection, info)
|
||||||
@ -121,8 +149,6 @@ bind_target_thread_vector (vec)
|
|||||||
target_thread_functions = vec;
|
target_thread_functions = vec;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Prototypes for exported functions. */
|
|
||||||
|
|
||||||
struct target_thread_vector *
|
struct target_thread_vector *
|
||||||
unbind_target_thread_vector ()
|
unbind_target_thread_vector ()
|
||||||
{
|
{
|
||||||
@ -132,55 +158,6 @@ unbind_target_thread_vector ()
|
|||||||
return retval;
|
return retval;
|
||||||
} /* unbind_target_thread-vector */
|
} /* unbind_target_thread-vector */
|
||||||
|
|
||||||
void _initialize_thread PARAMS ((void));
|
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for local functions. */
|
|
||||||
/* If the host has threads, the host machine definition may
|
|
||||||
set this macro. But, for remote thread debugging, it gets more
|
|
||||||
complex and setting macros does not bind to the various target
|
|
||||||
dependent methods well. So, we use the vector target_thread_functions
|
|
||||||
*/
|
|
||||||
#if !defined(FIND_NEW_THREADS)
|
|
||||||
#define FIND_NEW_THREADS target_find_new_threads
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static struct thread_info *thread_list = NULL;
|
|
||||||
static int highest_thread_num;
|
|
||||||
|
|
||||||
static void
|
|
||||||
thread_command PARAMS ((char * tidstr, int from_tty));
|
|
||||||
static void
|
|
||||||
prune_threads PARAMS ((void));
|
|
||||||
|
|
||||||
static void
|
|
||||||
switch_to_thread PARAMS ((int pid));
|
|
||||||
|
|
||||||
static struct thread_info *
|
|
||||||
find_thread_id PARAMS ((int num));
|
|
||||||
|
|
||||||
static void
|
|
||||||
info_threads_command PARAMS ((char *, int));
|
|
||||||
|
|
||||||
static void
|
|
||||||
restore_current_thread PARAMS ((int));
|
|
||||||
|
|
||||||
static void
|
|
||||||
thread_apply_all_command PARAMS ((char *, int));
|
|
||||||
|
|
||||||
static void
|
|
||||||
thread_apply_command PARAMS ((char *, int));
|
|
||||||
|
|
||||||
static void info_threads_command PARAMS ((char *, int));
|
|
||||||
|
|
||||||
static void restore_current_thread PARAMS ((int));
|
|
||||||
|
|
||||||
static void thread_apply_all_command PARAMS ((char *, int));
|
|
||||||
|
|
||||||
static void thread_apply_command PARAMS ((char *, int));
|
|
||||||
|
|
||||||
static int thread_alive PARAMS ((struct thread_info *));
|
|
||||||
|
|
||||||
void
|
void
|
||||||
init_thread_list ()
|
init_thread_list ()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user