1

I would like to place a breakpoint at a certain line in a certain file.

Using BREAK.SET I know that this is possible for functions and for an address.

I just want to place a breakpoint at a certain line(without knowing the address).

Is this possible in Lauterbach ?

John Smith
  • 777
  • 2
  • 14
  • 37

1 Answers1

3

Let's assume you want to set a breakpoint in line 42 of file c:\t32\myproject\myfile.c

Then the command would be

Break.Set \"c:\t32\myproject\myfile.c"\42

or simply

Break.Set \myfile\42
Holger
  • 3,920
  • 1
  • 13
  • 35
  • Can you tell me please, my line number is decided from the script, and the problem occurs in the fact that the line number is in hex format. I want it in integer format. How to put there a variable in integer format ? Break.Set \"c:\t32\myproject\myfile.c"\42 instead of Break.Set \"c:\t32\myproject\myfile.c"\0x42 – John Smith Sep 10 '15 at 12:46
  • Use function FORMAT.Decimal(0,&myMacro) to convert the hex number to a string containing a decimal representation. Assign the result to a PRACTICE macro and use this in the Break.Set command. E.g. Step1: `&LineNum=FORMAT.Decimal(0,0x42)`, Step2: `Break.Set \myfile\&LineNum` – Holger Sep 10 '15 at 13:06
  • My problem is somehow strange, I get the line number from a file. When I try to put that in break.set it appends 0x to that number. EX: Line number in file is 19 and when pass that to break.set is 0x19. What I need is actually 19. Is there a function to remove that 0x ? – John Smith Sep 11 '15 at 09:22
  • So you have 0x19 but you mean 19 as a decimal number? That's in fact rather odd and I think you should fix this at the source. Anyhow if you use function FORMAT.HEX(0,0x19) instead of FORMAT.Decimal(0,0x19) you should get what you want. Other solution would be using function STRing.CUT("0x19",2) – Holger Sep 11 '15 at 10:19