This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v16 1/5] New remove-symbol-file command.


>>>>> "Nicolas" == Nicolas Blanc <nicolas.blanc@intel.com> writes:

Nicolas> New command for removing symbol files added via
Nicolas> the add-symbol-file command.

Thanks.  A couple of small nits.

Nicolas> +int
Nicolas> +is_addr_in_objfile (CORE_ADDR addr, const struct objfile *objfile)
Nicolas> +{
Nicolas> +  struct obj_section *osect;
Nicolas> +
Nicolas> +  if (objfile == NULL)
Nicolas> +    return 0;
Nicolas> +
Nicolas> +  ALL_OBJFILE_OSECTIONS (objfile, osect)
Nicolas> +    {
Nicolas> +      if (obj_section_addr (osect) <= addr
Nicolas> +	  && addr < obj_section_endaddr (osect))
Nicolas> +	return 1;

I suspect this should also check section_is_mapped first.

Nicolas> +  if (args == NULL)
Nicolas> +    error (_("remove-symbol-file FILENAME\nremove-symbol-file -a ADDRESS"));

We don't normally use usage-style text for errors.  Instead it can just
say something along the lines of "remove-symbol-file: no symbol file
provided".

Nicolas> +	  if (objf->flags & OBJF_USERLOADED

Should have an explicit "!= 0" check here.

Nicolas> +      && !query (_("Remove symbol table from file \"%s\"? "), objfile_name (objf)))

Line too long, should wrap.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]