if (sop == NULL)
{
- sop = xcalloc (sizeof (struct so_list), 1);
+ sop = xcalloc (1, sizeof (struct so_list));
make_cleanup (xfree, sop);
- sop->lm_info = xcalloc (sizeof (struct lm_info), 1);
+ sop->lm_info = xcalloc (1, sizeof (struct lm_info));
make_cleanup (xfree, sop->lm_info);
sop->lm_info->mapname = xstrdup (mapname);
make_cleanup (xfree, sop->lm_info->mapname);
struct cleanup *old_chain = make_cleanup (null_cleanup, 0);
struct so_list *sos;
- sos = build_so_list_from_mapfile (PIDGET (inferior_pid),
+ sos = build_so_list_from_mapfile (PIDGET (inferior_ptid),
MA_MAINEXEC, MA_MAINEXEC);
struct so_list *sos;
/* Fetch the list of mappings, excluding the main executable. */
- sos = build_so_list_from_mapfile (PIDGET (inferior_pid), MA_MAINEXEC, 0);
+ sos = build_so_list_from_mapfile (PIDGET (inferior_ptid), MA_MAINEXEC, 0);
/* Reverse the list; it looks nicer when we print it if the mappings
are in the same order as in the map file. */
struct cleanup *old_chain = make_cleanup (null_cleanup, 0);
/* Fetch the mappings for the main executable from the map file. */
- so = build_so_list_from_mapfile (PIDGET (inferior_pid),
+ so = build_so_list_from_mapfile (PIDGET (inferior_ptid),
MA_MAINEXEC, MA_MAINEXEC);
/* Make sure we actually have some mappings to work with. */
/* Allocate the data structure which'll contain the new offsets to
relocate by. Initialize it so it contains the current offsets. */
- new_offsets = xcalloc (sizeof (struct section_offsets),
- symfile_objfile->num_sections);
+ new_offsets = xcalloc (symfile_objfile->num_sections,
+ sizeof (struct section_offsets));
make_cleanup (xfree, new_offsets);
for (i = 0; i < symfile_objfile->num_sections; i++)
new_offsets->offsets[i] = ANOFFSET (symfile_objfile->section_offsets, i);
CORE_ADDR global_pointer = 0;
struct cleanup *old_chain = make_cleanup (null_cleanup, 0);
- sos = build_so_list_from_mapfile (PIDGET (inferior_pid), 0, 0);
+ sos = build_so_list_from_mapfile (PIDGET (inferior_ptid), 0, 0);
for (so = sos; so != NULL; so = so->next)
{
struct cleanup *old_chain = make_cleanup (null_cleanup, 0);
/* Fetch the mappings for the main executable from the map file. */
- so = build_so_list_from_mapfile (PIDGET (inferior_pid),
+ so = build_so_list_from_mapfile (PIDGET (inferior_ptid),
MA_KERNTEXT, MA_KERNTEXT);
/* Make sure we actually have some mappings to work with. */