Ticket #1653 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

pbc_to_exe loses file information.

Reported by: coke Owned by:
Priority: normal Milestone:
Component: none Version: trunk
Severity: medium Keywords:
Cc: Language: tcl
Patch status: Platform:

Description

I noticed this while trying to debug partcl (0597fb5 from github.com/partcl/partcl on parrot r46913).

$ ./tclsh
expected integer but got "0"
current instr.: 'parrot;TclString;get_integer' pc -1 ((unknown file):-1)
called from Sub 'prepare_lib' pc 27503 (runtime/tcllib.pir:83)
... call repeated 1 times
called from Sub '_main' pc 0 (src/tclsh.pir:33)
... call repeated 1 times
$ parrot src/tclsh.pir 
expected integer but got "0"
current instr.: 'parrot;TclString;get_integer' pc 2471 (src/class/tclstring.pir:275)
called from Sub 'prepare_lib' pc 27503 (runtime/tcllib.pir:83)
... call repeated 1 times
called from Sub '_main' pc 0 (src/tclsh.pir:33)
... call repeated 1 times

Note that the first "current inst" line loses the filename it came from in the pbc_to_exe version.

Is this expected? a bug? If expected, a flag to add it back in would be nice.

Change History

Changed 4 years ago by plobsing

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

The fast core doesn't keep the pc updated. Notably if there is an error before the first update to the pc, the backtrace will show 'unknown file'.

To obtain accurate line information, the slow core should be used. r48655 adds a --runcore option to pbc_to_exe to do just that.

Note: See TracTickets for help on using tickets.