Recent

Author Topic: Seems I can call and debug Mac API calls without debugger barfing - whattodo?  (Read 2712 times)

MISV

  • Hero Member
  • *****
  • Posts: 783
n Lazarus 1.6.4 running in debugger macOS Sierra 10.12.4

With the underneath code (or anything calling any Mac API) I am getting

Quote
"The debugger encountered and error when trying to run/step the application. Cannot find bounds of current function"


Code: Pascal  [Select][+][-]
  1. procedure myTest;
  2. var
  3.   TestStrUTF8: UTF8String;
  4.   TmpStrPr_CSS: ConstCStringPtr;
  5.   TmpCFStrRef: CFStringRef;
  6.   TmpStrPtr: Pointer;
  7. begin
  8.   TestStrUTF8 := 'http://example.com';
  9.   TmpStrPtr := Pointer(TestStrUTF8)
  10.   TmpStrPtr_CSS := ConstCStringPtr(TmpStrPtr);
  11.   TmpCFStrRef := CStringCreateWithCString(nil, TmpStrPtr_CSS, kCFStringEncodinguTF8); // Note1: we are only using ASCII, Note2: We have tried KCFStringEncodingWindowsLatin1 with same problem
  12.  
  13.   // jumps out of routine - and shows debugger dialog "Cannot find bounds of current function" here
  14.  
  15.   showmessage('never reaches, crashes first');
  16. end;
  17.  


  • I do not otherwise have problems debugging.
  • I am running above code in main thread.
  • Problem seems to be the same for all Mac API calls - tried multiple within that "area"


Do you guys think the code will run correctly in release build? If so I guess I can try build a test case and "showmessage" debug it?

MISV

  • Hero Member
  • *****
  • Posts: 783
No luck trying version 8.0 of GDB...

Can anyone see/try if here is anything wrong with my code?

And if you can get it working, what settings are you using?

Could it be anything o do with SIP/address relocation?

 

TinyPortal © 2005-2018