Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] Setting break point programmatically
  • From: Gidi Gal <gidigal@xxxxxxxxxxx>
  • Date: Tue, 14 Jan 2020 10:44:01 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lTwO9o1S0DAehCgBNDL9S1OeqajXzu9kAw5ZdGTOayo=; b=gLrsEwfaYVILMbuR9fAoYJBGhUnbnq/MTlDZIDzjXYPJViPzwiiC+HUBTzhqJIPPApJyS/JVstK3wA/gsRESXSO47+nydD3l4zfi/6Skx1i3t7ElAWoiBamjibR1iZS/ZKDqI8QoavXtjbWPpFtmCN3nfcVIGSTNOlZN1RPhMhjc310u6b7KLTZCSKbZN2/JZaxQ0eykNunBaUjaHYpahXtT9s+kKjXLjqtYhxZ9dQ/Z4uDQmSzTQkqdvF07UcnGEFtGp8sc9jBjU10hkmsDbTUmZBhdbjNZPzO5ls9pDW/gKMkBZEwmobb+qw03iqzZJFZ/pbTdZZAe2Zgw+47kGw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YXY5pxye/6r0+YaW+1Qqh0s1bWyUVA7ZUCToaVLriDb6nOjYXaBxQdVq7/SdU5K1hVTXsmPLoNfiZtko2Xm2pZ660+zMm1VyuKr6C9KEJ6cdT5ivCnsizBvznUMtbC2a31/kNlaqWVlYCU/Dwq0xIn+b7oF8DXFym3qqNAR2RoXnap9Pt/4TS8ekajDSx0zedT6gid02TFbb6ST8owoMIN8u7vNJP0bNrAENb3n2kxlWzGGfE+QGbacQERaUoBf0Gjg2kvC5owvRocgLQL7FAl+CKh7ov/yx7PtPggI/LnVqmC0Pgr4WRI8f+E/k6G8BF/3dpjRWcL4fIKZD382dqg==
  • Delivered-to: tcf-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/tcf-dev>
  • List-help: <mailto:tcf-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/tcf-dev>, <mailto:tcf-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/tcf-dev>, <mailto:tcf-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHVyj7dGyf4Iw5wVUyrH6mn0nNTaafpKONygAA4AxCAAJcWSw==
  • Thread-topic: Setting break point programmatically

Hello Eugene,

Thanks for your reply. I think I found the problem. Part of my path was case-insensitive. Once it was fixed, the break point seems to be added successfully.

Best regards,
Gidi


From: tcf-dev-bounces@xxxxxxxxxxx <tcf-dev-bounces@xxxxxxxxxxx> on behalf of Eugene Tarassov <eugenet@xxxxxxxxxx>
Sent: Tuesday, January 14, 2020 1:58 AM
To: TCF Development <tcf-dev@xxxxxxxxxxx>
Subject: Re: [tcf-dev] Setting break point programmatically
 

Hi,

 

IBreakpoints.PROP_FILE is path of the source file when it was compiled.

You have to know where you compile your code, it is not a job of the debugger.

 

Regards,

Eugene

 

From: tcf-dev-bounces@xxxxxxxxxxx <tcf-dev-bounces@xxxxxxxxxxx> On Behalf Of Gidi Gal
Sent: Monday, January 13, 2020 2:22 PM
To: tcf-dev@xxxxxxxxxxx <tcf-dev@xxxxxxxxxxx>
Subject: Re: [tcf-dev] Setting break point programmatically

 

EXTERNAL EMAIL

Hello,

 

I made some progress with my understanding of the problem. I was setting the path to the file in property IBreakpoints.PROP_FILE with the local path and not the path on the target. Once I set the path to the file in the target, breakpoint was set successfully. While I understand how to do this on a Linux VM, my main focus is on a VxWorks target. The file which I want to set breakpoint is located in a static library which is linked into a downloadable kernel module. When I launch my application, I specify the module file name.

Is there a view in TCF that can show me the path to this file in the target ?

 

Thanks,

Gidi

 


From: tcf-dev-bounces@xxxxxxxxxxx <tcf-dev-bounces@xxxxxxxxxxx> on behalf of Gidi Gal <gidigal@xxxxxxxxxxx>
Sent: Monday, January 13, 2020 6:43 PM
To: tcf-dev@xxxxxxxxxxx <tcf-dev@xxxxxxxxxxx>
Subject: [tcf-dev] Setting break point programmatically

 

Hello,

 

I am trying to add a break point using TCF API. Here is the code I am using :

 

private void createAnimBreakpointUsingTCF(final String sourceHandle, int line) {

 

         Map<String, Object> properties = new HashMap<String, Object>();

        properties.put(IBreakpoints.PROP_FILE, sourceHandle);

         properties.put(IBreakpoints.PROP_TYPE, "Auto");

         properties.put(IBreakpoints.PROP_ID, UUID.randomUUID().toString());

         properties.put(IBreakpoints.PROP_LINE, line);

         properties.put(IBreakpoints.PROP_ENABLED, true);

         //m_animBreakpoint stores IBreakpoints service which is received from IChannel. The method is called after testing that the channel is in state IChannel.STATE_OPEN

         this.m_animBreakpoint = this.m_breakpoints.add(properties, new DoneCommand() {

                   @Override

                   public void doneCommand(IToken token, Exception error) {

                               if (error != null) {

                                     //TODO report error

                                     System.out.println("test");

                              }                                     

                    }         

          });

}

 

The breakpoint is not set correctly. When I look in its properties I see in the status page the report "Error: unresolved source line information".

When I add the break point manually, it is added successfully.

I tried to debug the manual addition of the break point, I don't see differences between the path to the path that I send in my code and the debugged path. I tried also this code, which is called higher in the call stack, in the process of manually adding a break point:

 

private void createAnimBreakpointUsingCDI(final String sourceHandle, final int line) {

             Display.getDefault().asyncExec(new Runnable() {

             @Override

              public void run() {

                           Map<String, Object> attributes = new HashMap<String, Object>();

                           ICLineBreakpoint lineBp = CDIDebugModel.createBlankLineBreakpoint();

                           CDIDebugModel.setLineBreakpointAttributes(attributes, sourceHandle, 0, line, true, 0, "" ); //$NON-NLS-1$

                           //The file in focus is not part of Eclipse project.

                           IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();

                            try {

                                      CDIDebugModel.createBreakpointMarker(lineBp, root, attributes, true);

                            } catch (CoreException e) {

                                    e.printStackTrace();

                            }

               }

               });

}

 

The break point is added with an error icon near it, tool tip is showing the error: failed to plant: Unresolved source line information.

 

I'll try to build a small test that reproduces this issue. If you have any idea how to solve it, I'll be grateful for your reply.

 

Thanks,

Gidi

 


Back to the top