Oberon Community Platform Forum
November 22, 2019, 06:04:10 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: could not locate pc  (Read 5529 times)
BohdanT
Sr. Member
****
Posts: 271


Life is difficult, but fortunately is short!


WWW
« on: January 31, 2011, 01:00:59 PM »

Stopped working FindPC (even before the new year).
I tested it on 4 computers (Intel processors).
Run directly from a folder with SVN-repository (ie nothing to do with the settings)

If someone else have this problem, confirm!
Logged
sage
Full Member
***
Posts: 170



WWW
« Reply #1 on: January 31, 2011, 01:03:02 PM »

I have the same problem on 3 PCs, all has Intel processors.
Logged
negelef
Administrator
Jr. Member
*****
Posts: 55


« Reply #2 on: January 31, 2011, 01:25:35 PM »

The string passed to FindPC now requires the actual symbol name of the procedure. This name is given in the TRAPS window right before the actual pc number. Executing the following command for example:

Code:
MODULE Test;

PROCEDURE Command*;
BEGIN HALT (1234);
END Command;

END Test.

result in the following trap. The selection for FindPC is highlighted


[1] TRAP 1234 PL 3 1234  HALT statement WinAos Revision 2946 (24.02.2010)
...
Test.Command:15 pc=15 [0000000FH] = 0 + 15
...

Logged
felix
Administrator
Newbie
*****
Posts: 17



WWW
« Reply #3 on: January 31, 2011, 01:33:21 PM »

The new compiler in principle generates object files that are not directly related to modules. (I am currently writing a report on the new planned generic object file format - there I will explain why).
FindPC still works but instead of only a number it needs a section name plus number.

Example:
MODULE Test;
   PROCEDURE Test1;(* some code to generate offset of procedure Test different from 0 *)
   VAR a: LONGINT;
   BEGIN a  := 0; END Test1;
   
   PROCEDURE Test*;
   BEGIN Test1; HALT(100); END Test;
END Test.

Calling Test.Test invokes the following trap:

[1] TRAP 100 PL 3 100  HALT statement WinAos Revision 2946 (24.02.2010) ...
Process: 2840 run 0 2084CF898:Commands.Runner NIL {0, 28}
Test.Test:27 pc=34 [00000022H] = 7 + 27
State Test:
Commands.Runner.@Body:466 pc=1307 [0000051BH] = 841 + 466
  @Self=084CF898H (Commands.Runner)

To find the PC select Test.Test:27 (instead of only 27) as PC:

Compiler.Compile --findPC=Test.Test:27 Test.Mod ~

Hope this helps,
Felix
Logged
BohdanT
Sr. Member
****
Posts: 271


Life is difficult, but fortunately is short!


WWW
« Reply #4 on: January 31, 2011, 01:37:53 PM »

Thanks, now works.


However!

Guess from this post that now need to do differently (especially as the post half a year) almost unreal!

Quote
new findPC with sectionName:offsetName for new object file format

Revision: 3479
Author: felix
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!