Ticket #577 (closed patch: fixed)

Opened 13 years ago

Last modified 13 years ago

add "--no-line-directives" switch to Configure.pl

Reported by: bsdz Owned by: jkeenan
Priority: normal Milestone:
Component: configure Version: trunk
Severity: medium Keywords: ops2pm pmc2c ops2c
Cc: Language:
Patch status: applied Platform: all

Description

Add new switch to Configure.pl that disables the generation of #line directives in generated C. Also fix pmc2c.pl's Emitter so that it does not ignore its --no-lines command line switch.

Attachments

no-line-directives.patch Download (5.2 KB) - added by bsdz 13 years ago.
patch adds new switch to Configure.pl

Change History

Changed 13 years ago by bsdz

patch adds new switch to Configure.pl

in reply to: ↑ description   Changed 13 years ago by jkeenan

Replying to bsdz:

Add new switch to Configure.pl that disables the generation of #line directives in generated C. Also fix pmc2c.pl's Emitter so that it does not ignore its --no-lines command line switch.

To help those of us who, like myself, don't understand the issues involved, would you be able to post examples of what debugging looks like both with and without the line directives?

Thank you very much.

kid51

follow-up: ↓ 3   Changed 13 years ago by bsdz

It's difficult to post examples without perhaps some screenshots.

What I can tell you is that, when using Visual Studio, the compiler overwrites the real positional information (i.e. real file and real file line) with those provided by the #line directives. Of course this is to be expected.

However, this means when stepping through Parrot internals' code the debugger does not show you the real C file and line of what code you are stepping through but the original template code, that is you step through the pmc and ops files. This compounded with the fact that sometimes the preprocessor Perl scripts emit incorrect #line directives (not entirely sure how?); this makes things even more confusing.

There is no way one can make VS ignore #line directives without going through each file and commenting them individually (not sure why there's no #pragma to do that?).

Please also note the patch fixes a bug where pmc2c.pl already accepted a "--no-lines" switch but silently ignored it.

in reply to: ↑ 2   Changed 13 years ago by jkeenan

  • owner set to jkeenan
  • status changed from new to assigned
  • patch changed from new to applied

Replying to bsdz:

Thanks. Patch applied in r38414. I would appreciate feedback from people more familiar with Parrot debugging than I am. I will keep TT open for about a week to gather feedback.

kid51

  Changed 13 years ago by jkeenan

  • status changed from assigned to closed
  • resolution set to fixed

No complaints. Closing ticket.

Note: See TracTickets for help on using tickets.