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 1/9] bp_location.source_file -> bp_location.symtab


> currently bp_location stored symtab->filename copy.  This could get
> for example incorrectly ambiguous during matching, also one could not
> display absolute filename for such breakpoint location as it did not
> store comp_dir etc.
> 
> I found it easier to just reference symtab, which already provides all
> the functions.

I am not a specialist of this area, but I like the idea, and I see
that it already deals with the case where an objfile/symtab gets
freed, so we don't end up with a dangling pointer.

> -  /* Source file name of this address.  */
> +  /* Source file name which was used to place this location.  */
>  
> -  char *source_file;
> +  struct symtab *symtab;
>  };

One thing, though. Why preserve "file name" in the comment, since
this no longer is a filename?

-- 
Joel


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