Opened 13 years ago

Last modified 13 years ago

#105 assigned defect

emxomfld: intermediate file name for OMF convertion

Reported by: froloff Owned by: bird
Priority: normal Milestone: libc-0.7
Component: emx Version: 0.6
Severity: normal Keywords:
Cc:

Description

emxomfld use make_tempfile() function to create intermediate file when -Zomf switch provided and input files are in a.out format. This function create random temporary name, which changed every time, when convertion performed. This cause that debugger breakpoints must be reassigned each time, when exe/dll module rebuilded.

To solve this I propose to use the same base name and .obj extention for intermediate files when convert from .o input and lib when convert from .a. We can also check if the destination file already exist before returning the intermediate name and fall into make_tempfile() if this true.

Possible make_omffile() function source provided in attach.

Attachments (1)

emxomfld-diff.zip (656 bytes) - added by anonymous 13 years ago.

Download all attachments as: .zip

Change History (2)

Changed 13 years ago by anonymous

comment:1 Changed 13 years ago by bird

  • Milestone changed from libc-0.6 to libc-0.7
  • Status changed from new to assigned
  • Summary changed from intermediate file name for OMF convertion to emxomfld: intermediate file name for OMF convertion
  • Type set to defect
  • Version changed from 1.1 to 0.6

This is a bit tricky.

On the one hand we should definitly not make remembering breakpoints more difficult for the scatter brain of a debugger we're doomed to use.

On the other hand, we've already run into serious trouble because of temporary name conflicts with emxomf (gas -Zomf / parallel mozilla builds). While this is a link stage thing, and you might argue that even with a parallel build the likely hood of a conflict relativly small, it remains a potential problem. And you can be certain that if we make any such assumption, some bugger is gonna come with some seriously weird bug report within the week of the release.

So, a safer way of passing the output file to emxomf has to be found. Adding a --output-fd <file handle> option would be favourite. But a good start would be to change make_tempfile to create the file - that'll reduce the risk of clashes considerably. (Dunno why I'm not already doing that...)

PS. The proposed make_omffile could be implemented much more elegantly and without any left over TODOs by adding three lines to make_tempfile.

PPS. Try set the correct milestone and version. It doesn't make sense to report problems on a release which is years ahead with a milestone which is already completed. Rule: milestone >= version

Note: See TracTickets for help on using tickets.