[RFA/hpux] Implement file_matches_executable_p

Daniel Jacobowitz drow@false.org
Fri Nov 18 02:32:00 GMT 2005


On Thu, Nov 17, 2005 at 05:04:39PM -0800, Joel Brobecker wrote:
>   1. Revert the order, and compute core first. If we can't
>      get a name (ie get NULL), then return immediately.
>      Return which value though? I think we should return 0,
>      but this may cause warnings in GDB that weren't there
>      before. I do expect that most of the time, the user will
>      be using the correct core file, but I think it's better
>      to warn when we're not sure.

If we can't extract a failing command from the core file, then why
bother warning?  There's no way the user can shut it up.  Seems rude.

>   2. I think I need to add some guards against a null core.
>      I looked at a draft of the C90 standard, and it doesn't
>      say how well it reacts to a null string... Should I also
>      do the same for exec? I don't think that bfd_get_filename
>      can ever return a null string, right?

In general you can never pass NULL to standard library functions that
expect strings.  Always check first.  I don't think you have to worry
about bfd_get_filename though.

-- 
Daniel Jacobowitz
CodeSourcery, LLC



More information about the Binutils mailing list