forked from Imagelibrary/binutils-gdb
Use correct default for target functions that return pointer
* target.c (return_null): Define. (update_current_target): Use it instead of return_zero for functions that return a pointer.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2014-01-07 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* target.c (return_null): Define.
|
||||
(update_current_target): Use it instead of return_zero for
|
||||
functions that return a pointer.
|
||||
|
||||
2014-01-07 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
|
||||
|
||||
* source.c (add_path): Fix check for duplicated paths in the previously
|
||||
|
||||
16
gdb/target.c
16
gdb/target.c
@@ -64,6 +64,8 @@ static int return_one (void);
|
||||
|
||||
static int return_minus_one (void);
|
||||
|
||||
static void *return_null (void);
|
||||
|
||||
void target_ignore (void);
|
||||
|
||||
static void target_command (char *, int);
|
||||
@@ -806,10 +808,10 @@ update_current_target (void)
|
||||
return_zero);
|
||||
de_fault (to_extra_thread_info,
|
||||
(char *(*) (struct thread_info *))
|
||||
return_zero);
|
||||
return_null);
|
||||
de_fault (to_thread_name,
|
||||
(char *(*) (struct thread_info *))
|
||||
return_zero);
|
||||
return_null);
|
||||
de_fault (to_stop,
|
||||
(void (*) (ptid_t))
|
||||
target_ignore);
|
||||
@@ -819,7 +821,7 @@ update_current_target (void)
|
||||
tcomplain);
|
||||
de_fault (to_pid_to_exec_file,
|
||||
(char *(*) (int))
|
||||
return_zero);
|
||||
return_null);
|
||||
de_fault (to_async,
|
||||
(void (*) (void (*) (enum inferior_event_type, void*), void*))
|
||||
tcomplain);
|
||||
@@ -918,7 +920,7 @@ update_current_target (void)
|
||||
tcomplain);
|
||||
de_fault (to_traceframe_info,
|
||||
(struct traceframe_info * (*) (void))
|
||||
return_zero);
|
||||
return_null);
|
||||
de_fault (to_supports_evaluation_of_breakpoint_conditions,
|
||||
(int (*) (void))
|
||||
return_zero);
|
||||
@@ -3634,6 +3636,12 @@ return_minus_one (void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void *
|
||||
return_null (void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Find the next target down the stack from the specified target.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user