statements because local_hex_string returns a local static
statements because hex_string returns a local static
add_symbol_file_command (char *args, int from_tty){  char *filename = NULL;  int flags = OBJF_USERLOADED;  char *arg;  int expecting_option = 0;  int section_index = 0;  int argcnt = 0;  int sec_num = 0;  int i;  int expecting_sec_name = 0;  int expecting_sec_addr = 0;  struct sect_opt  {    char *name;    char *value;  };  struct section_addr_info *section_addrs;  struct sect_opt *sect_opts = NULL;  size_t num_sect_opts = 0;  struct cleanup *my_cleanups = make_cleanup (null_cleanup, NULL);  num_sect_opts = 16;  sect_opts = (struct sect_opt *) xmalloc (num_sect_opts 					   * sizeof (struct sect_opt));  dont_repeat ();  if (args == NULL)    error ("add-symbol-file takes a file name and an address");  /* Make a copy of the string that we can safely write into. */  args = xstrdup (args);  while (*args != '\000')    {      /* Any leading spaces? */      while (isspace (*args))	args++;      /* Point arg to the beginning of the argument. */      arg = args;      /* Move args pointer over the argument. */      while ((*args != '\000') && !isspace (*args))	args++;      /* If there are more arguments, terminate arg and         proceed past it. */      if (*args != '\000')	*args++ = '\000';      /* Now process the argument. */      if (argcnt == 0)	{	  /* The first argument is the file name. */	  filename = tilde_expand (arg);	  make_cleanup (xfree, filename);	}      else	if (argcnt == 1)	  {	    /* The second argument is always the text address at which               to load the program. */	    sect_opts[section_index].name = ".text";	    sect_opts[section_index].value = arg;	    if (++section_index > num_sect_opts) 	      {		num_sect_opts *= 2;		sect_opts = ((struct sect_opt *) 			     xrealloc (sect_opts,				       num_sect_opts 				       * sizeof (struct sect_opt)));	      }	  }	else	  {	    /* It's an option (starting with '-') or it's an argument	       to an option */	    if (*arg == '-')	      {		if (strcmp (arg, "-readnow") == 0)		  flags |= OBJF_READNOW;		else if (strcmp (arg, "-s") == 0)		  {		    expecting_sec_name = 1;		    expecting_sec_addr = 1;		  }	      }	    else	      {		if (expecting_sec_name)		  {		    sect_opts[section_index].name = arg;		    expecting_sec_name = 0;		  }		else		  if (expecting_sec_addr)		    {		      sect_opts[section_index].value = arg;		      expecting_sec_addr = 0;		      if (++section_index > num_sect_opts) 			{			  num_sect_opts *= 2;			  sect_opts = ((struct sect_opt *) 				       xrealloc (sect_opts,						 num_sect_opts 						 * sizeof (struct sect_opt)));			}		    }		  else		    error ("USAGE: add-symbol-file <filename> <textaddress> [-mapped] [-readnow] [-s <secname> <addr>]*");	      }	  }      argcnt++;    }  /* Print the prompt for the query below. And save the arguments into     a sect_addr_info structure to be passed around to other     functions.  We have to split this up into separate print     statements because local_hex_string returns a local static     string. */   printf_unfiltered ("add symbol table from file \"%s\" at\n", filename);  section_addrs = alloc_section_addr_info (section_index);  make_cleanup (xfree, section_addrs);  for (i = 0; i < section_index; i++)    {      CORE_ADDR addr;      char *val = sect_opts[i].value;      char *sec = sect_opts[i].name;       addr = parse_and_eval_address (val);      /* Here we store the section offsets in the order they were         entered on the command line. */      section_addrs->other[sec_num].name = sec;      section_addrs->other[sec_num].addr = addr;      printf_unfiltered ("\t%s_addr = %s\n",		       sec, 		       local_hex_string ((unsigned long)addr));      sec_num++;      /* The object's sections are initialized when a 	 call is made to build_objfile_section_table (objfile).	 This happens in reread_symbols. 	 At this point, we don't know what file type this is,	 so we can't determine what section names are valid.  */    }  if (from_tty && (!query ("%s", "")))    error ("Not confirmed.");  symbol_file_add (filename, from_tty, section_addrs, 0, flags);  /* Getting new symbols may change our opinion about what is     frameless.  */  reinit_frame_cache ();  do_cleanups (my_cleanups);}