mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 15:18:37 +08:00
gdb/
Code cleanup. * solib-svr4.c (svr4_default_sos): Remove variables head and link_ptr. Rearrange the code for it.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2011-10-02 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
Code cleanup.
|
||||||
|
* solib-svr4.c (svr4_default_sos): Remove variables head and link_ptr.
|
||||||
|
Rearrange the code for it.
|
||||||
|
|
||||||
2011-10-02 Joel Brobecker <brobecker@adacore.com>
|
2011-10-02 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
* breakpoint.c (bkpt_print_recreate): Add call to
|
* breakpoint.c (bkpt_print_recreate): Add call to
|
||||||
|
@ -949,13 +949,12 @@ static struct so_list *
|
|||||||
svr4_default_sos (void)
|
svr4_default_sos (void)
|
||||||
{
|
{
|
||||||
struct svr4_info *info = get_svr4_info ();
|
struct svr4_info *info = get_svr4_info ();
|
||||||
|
struct so_list *new;
|
||||||
|
|
||||||
struct so_list *head = NULL;
|
if (!info->debug_loader_offset_p)
|
||||||
struct so_list **link_ptr = &head;
|
return NULL;
|
||||||
|
|
||||||
if (info->debug_loader_offset_p)
|
new = XZALLOC (struct so_list);
|
||||||
{
|
|
||||||
struct so_list *new = XZALLOC (struct so_list);
|
|
||||||
|
|
||||||
new->lm_info = xmalloc (sizeof (struct lm_info));
|
new->lm_info = xmalloc (sizeof (struct lm_info));
|
||||||
|
|
||||||
@ -965,16 +964,11 @@ svr4_default_sos (void)
|
|||||||
new->lm_info->lm_addr = 0;
|
new->lm_info->lm_addr = 0;
|
||||||
new->lm_info->lm = NULL;
|
new->lm_info->lm = NULL;
|
||||||
|
|
||||||
strncpy (new->so_name, info->debug_loader_name,
|
strncpy (new->so_name, info->debug_loader_name, SO_NAME_MAX_PATH_SIZE - 1);
|
||||||
SO_NAME_MAX_PATH_SIZE - 1);
|
|
||||||
new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||||
strcpy (new->so_original_name, new->so_name);
|
strcpy (new->so_original_name, new->so_name);
|
||||||
|
|
||||||
*link_ptr = new;
|
return new;
|
||||||
link_ptr = &new->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
return head;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Implement the "current_sos" target_so_ops method. */
|
/* Implement the "current_sos" target_so_ops method. */
|
||||||
|
Reference in New Issue
Block a user