How to debug on self-hosted system (Momentics)

Hi,

I just installed a Monmentics PE 6.2.1 and played with it. I have a QNX
6.2.1 platform in my PC. So it is a slef-hosted system. According to
QNX’s on-line manual, the codes should be able to be debugged without
target board.

The problem is I can “RUN” and see the result of the “Hello World!”
program, but I can not debug it!

I have many choices in lunch configurations.

  1. C/C++ local: It says, “Failed to lunch CDI debugger…”
  2. C/C++ post morterm debugger: It asks me for a core file. Then I
    create one and offer it. But when it come bakc to the IDE, all the debug
    funcation buttons are disabled.
  3. Should I use the pdebug and qconn? But I think they need to connect
    with target board. (Or maybe I should install something on my PC and
    make it to be the host and target in the sametime???)

Any suggestions?? Thank you!

Ling

Hello Ling,

You have to setup your localhost as a target. First you must run qconn as
root. You can do this from a console. Once your project is built you can
select ‘run->debug’ from the menu. If you don’t have a target setup yet it
will present you with a dialog ‘Create, Manage and Launch Configuration’.
In the list you will see C/C++ QNX QCONN. If you right click on this and
select ‘new’ you will be presented with a ‘Main’ tab. In here you can set
you project and C/C++ application. At the bottom of this tab you will see a
target window. Right click in that window and select ‘Add Target’. Give it
a name and use the IP of the local system in the ‘Hostname or IP’ section.
Select finish and you should now be able to debug your application locally.

I hope this helps.

Regards,
Dave B.



“Ling Shen” <ling@ece.concordia.ca> wrote in message
news:3EDCC1D4.4040105@ece.concordia.ca

Hi,

I just installed a Monmentics PE 6.2.1 and played with it. I have a QNX
6.2.1 platform in my PC. So it is a slef-hosted system. According to
QNX’s on-line manual, the codes should be able to be debugged without
target board.

The problem is I can “RUN” and see the result of the “Hello World!”
program, but I can not debug it!

I have many choices in lunch configurations.

  1. C/C++ local: It says, “Failed to lunch CDI debugger…”
  2. C/C++ post morterm debugger: It asks me for a core file. Then I
    create one and offer it. But when it come bakc to the IDE, all the debug
    funcation buttons are disabled.
  3. Should I use the pdebug and qconn? But I think they need to connect
    with target board. (Or maybe I should install something on my PC and
    make it to be the host and target in the sametime???)

Any suggestions?? Thank you!

Ling

Hello Dave,

Thank you so much. I can debug my codes on my PC without other
target now. I can see the variables, use step and step over.

But there still is a very strange thing, I can use ‘Run to C/C++
line’, but I CAN NOT set a breakpoint in my C source! Are there some
other settings that I need to pay attention to?

Best regards

Ling


Dave Boltz wrote:

Hello Ling,

You have to setup your localhost as a target. First you must run qconn as
root. You can do this from a console. Once your project is built you can
select ‘run->debug’ from the menu. If you don’t have a target setup yet it
will present you with a dialog ‘Create, Manage and Launch Configuration’.
In the list you will see C/C++ QNX QCONN. If you right click on this and
select ‘new’ you will be presented with a ‘Main’ tab. In here you can set
you project and C/C++ application. At the bottom of this tab you will see a
target window. Right click in that window and select ‘Add Target’. Give it
a name and use the IP of the local system in the ‘Hostname or IP’ section.
Select finish and you should now be able to debug your application locally.

I hope this helps.

Regards,
Dave B.



“Ling Shen” <> ling@ece.concordia.ca> > wrote in message
news:> 3EDCC1D4.4040105@ece.concordia.ca> …

Hi,

I just installed a Monmentics PE 6.2.1 and played with it. I have a QNX
6.2.1 platform in my PC. So it is a slef-hosted system. According to
QNX’s on-line manual, the codes should be able to be debugged without
target board.

The problem is I can “RUN” and see the result of the “Hello World!”
program, but I can not debug it!

I have many choices in lunch configurations.

  1. C/C++ local: It says, “Failed to lunch CDI debugger…”
  2. C/C++ post morterm debugger: It asks me for a core file. Then I
    create one and offer it. But when it come bakc to the IDE, all the debug
    funcation buttons are disabled.
  3. Should I use the pdebug and qconn? But I think they need to connect
    with target board. (Or maybe I should install something on my PC and
    make it to be the host and target in the sametime???)

Any suggestions?? Thank you!

Ling
\

Hello Dave B,

I just find the answer for my previous question about Breakpoints! It
seems that Dave G also has same thing! :slight_smile:

“By default you must enable this ability. You can do this by going to
window->customize prospective … ; other and then make sure that
c/c++ debug box is checked. Now when you go to run while in the debug
view you will have the option to add a watchpoint/BP.” HaHa!

But why not make it as a default setting? It is so hard to find the
place to set it. I think almost everyone who want to debug a C/C++
source wants to use those features.


Best Regards,

Ling


Dave Boltz wrote:

Hello Ling,

You have to setup your localhost as a target. First you must run qconn as
root. You can do this from a console. Once your project is built you can
select ‘run->debug’ from the menu. If you don’t have a target setup yet it
will present you with a dialog ‘Create, Manage and Launch Configuration’.
In the list you will see C/C++ QNX QCONN. If you right click on this and
select ‘new’ you will be presented with a ‘Main’ tab. In here you can set
you project and C/C++ application. At the bottom of this tab you will see a
target window. Right click in that window and select ‘Add Target’. Give it
a name and use the IP of the local system in the ‘Hostname or IP’ section.
Select finish and you should now be able to debug your application locally.

I hope this helps.

Regards,
Dave B.



“Ling Shen” <> ling@ece.concordia.ca> > wrote in message
news:> 3EDCC1D4.4040105@ece.concordia.ca> …

Hi,

I just installed a Monmentics PE 6.2.1 and played with it. I have a QNX
6.2.1 platform in my PC. So it is a slef-hosted system. According to
QNX’s on-line manual, the codes should be able to be debugged without
target board.

The problem is I can “RUN” and see the result of the “Hello World!”
program, but I can not debug it!

I have many choices in lunch configurations.

  1. C/C++ local: It says, “Failed to lunch CDI debugger…”
  2. C/C++ post morterm debugger: It asks me for a core file. Then I
    create one and offer it. But when it come bakc to the IDE, all the debug
    funcation buttons are disabled.
  3. Should I use the pdebug and qconn? But I think they need to connect
    with target board. (Or maybe I should install something on my PC and
    make it to be the host and target in the sametime???)

Any suggestions?? Thank you!

Ling
\

Hi Ling,

You can simply double click or right click on the small gray area to the
left of your source view. A small circle is placed there to indicate the
breakpoint is set.

Regards,

Dave B.

“Ling Shen” <ling@ece.concordia.ca> wrote in message
news:3EDDF8DC.50700@ece.concordia.ca

Hello Dave,

Thank you so much. I can debug my codes on my PC without other
target now. I can see the variables, use step and step over.

But there still is a very strange thing, I can use ‘Run to C/C++
line’, but I CAN NOT set a breakpoint in my C source! Are there some
other settings that I need to pay attention to?

Best regards

Ling


Dave Boltz wrote:
Hello Ling,

You have to setup your localhost as a target. First you must run qconn
as
root. You can do this from a console. Once your project is built you
can
select ‘run->debug’ from the menu. If you don’t have a target setup yet
it
will present you with a dialog ‘Create, Manage and Launch
Configuration’.
In the list you will see C/C++ QNX QCONN. If you right click on this
and
select ‘new’ you will be presented with a ‘Main’ tab. In here you can
set
you project and C/C++ application. At the bottom of this tab you will
see a
target window. Right click in that window and select ‘Add Target’.
Give it
a name and use the IP of the local system in the ‘Hostname or IP’
section.
Select finish and you should now be able to debug your application
locally.

I hope this helps.

Regards,
Dave B.



“Ling Shen” <> ling@ece.concordia.ca> > wrote in message
news:> 3EDCC1D4.4040105@ece.concordia.ca> …

Hi,

I just installed a Monmentics PE 6.2.1 and played with it. I have a QNX
6.2.1 platform in my PC. So it is a slef-hosted system. According to
QNX’s on-line manual, the codes should be able to be debugged without
target board.

The problem is I can “RUN” and see the result of the “Hello World!”
program, but I can not debug it!

I have many choices in lunch configurations.

  1. C/C++ local: It says, “Failed to lunch CDI debugger…”
  2. C/C++ post morterm debugger: It asks me for a core file. Then I
    create one and offer it. But when it come bakc to the IDE, all the debug
    funcation buttons are disabled.
  3. Should I use the pdebug and qconn? But I think they need to connect
    with target board. (Or maybe I should install something on my PC and
    make it to be the host and target in the sametime???)

Any suggestions?? Thank you!

Ling


\

This is being addressed and should be the default for the future.

Regards,
Dave B.


“Ling Shen” <ling@ece.concordia.ca> wrote in message
news:3EDDFAFD.5000909@ece.concordia.ca

Hello Dave B,

I just find the answer for my previous question about Breakpoints! It
seems that Dave G also has same thing! > :slight_smile:

“By default you must enable this ability. You can do this by going to
window->customize prospective … ; other and then make sure that
c/c++ debug box is checked. Now when you go to run while in the debug
view you will have the option to add a watchpoint/BP.” HaHa!

But why not make it as a default setting? It is so hard to find the
place to set it. I think almost everyone who want to debug a C/C++
source wants to use those features.


Best Regards,

Ling

/pre></div
Dave Boltz wrote:
Hello Ling,

You have to setup your localhost as a target. First you must run qconn
as
root. You can do this from a console. Once your project is built you
can
select ‘run->debug’ from the menu. If you don’t have a target setup yet
it
will present you with a dialog ‘Create, Manage and Launch
Configuration’.
In the list you will see C/C++ QNX QCONN. If you right click on this
and
select ‘new’ you will be presented with a ‘Main’ tab. In here you can
set
you project and C/C++ application. At the bottom of this tab you will
see a
target window. Right click in that window and select ‘Add Target’.
Give it
a name and use the IP of the local system in the ‘Hostname or IP’
section.
Select finish and you should now be able to debug your application
locally.

I hope this helps.

Regards,
Dave B.



“Ling Shen” <> ling@ece.concordia.ca> > wrote in message
news:> 3EDCC1D4.4040105@ece.concordia.ca> …

Hi,

I just installed a Monmentics PE 6.2.1 and played with it. I have a QNX
6.2.1 platform in my PC. So it is a slef-hosted system. According to
QNX’s on-line manual, the codes should be able to be debugged without
target board.

The problem is I can “RUN” and see the result of the “Hello World!”
program, but I can not debug it!

I have many choices in lunch configurations.

  1. C/C++ local: It says, “Failed to lunch CDI debugger…”
  2. C/C++ post morterm debugger: It asks me for a core file. Then I
    create one and offer it. But when it come bakc to the IDE, all the debug
    funcation buttons are disabled.
  3. Should I use the pdebug and qconn? But I think they need to connect
    with target board. (Or maybe I should install something on my PC and
    make it to be the host and target in the sametime???)

Any suggestions?? Thank you!

Ling


\

Dear Dave B,

Thank you so much for your help!
Best regards

Ling

Ling,

My question was a little different because I was able to set breakpoints
just not watchpoints. And, yes, I was debugging C++ programs without the
option set. I’m glad to hear they plan on turning this option on in the
future.

Regards,
Dave G.

“Ling Shen” <ling@ece.concordia.ca> wrote in message
news:3EDDFAFD.5000909@ece.concordia.ca

Hello Dave B,

I just find the answer for my previous question about Breakpoints! It
seems that Dave G also has same thing! > :slight_smile:

“By default you must enable this ability. You can do this by going to
window->customize prospective … ; other and then make sure that
c/c++ debug box is checked. Now when you go to run while in the debug
view you will have the option to add a watchpoint/BP.” HaHa!

But why not make it as a default setting? It is so hard to find the
place to set it. I think almost everyone who want to debug a C/C++
source wants to use those features.


Best Regards,

Ling

/pre></div
Dave Boltz wrote:
Hello Ling,

You have to setup your localhost as a target. First you must run qconn
as
root. You can do this from a console. Once your project is built you
can
select ‘run->debug’ from the menu. If you don’t have a target setup yet
it
will present you with a dialog ‘Create, Manage and Launch
Configuration’.
In the list you will see C/C++ QNX QCONN. If you right click on this
and
select ‘new’ you will be presented with a ‘Main’ tab. In here you can
set
you project and C/C++ application. At the bottom of this tab you will
see a
target window. Right click in that window and select ‘Add Target’.
Give it
a name and use the IP of the local system in the ‘Hostname or IP’
section.
Select finish and you should now be able to debug your application
locally.

I hope this helps.

Regards,
Dave B.



“Ling Shen” <> ling@ece.concordia.ca> > wrote in message
news:> 3EDCC1D4.4040105@ece.concordia.ca> …

Hi,

I just installed a Monmentics PE 6.2.1 and played with it. I have a QNX
6.2.1 platform in my PC. So it is a slef-hosted system. According to
QNX’s on-line manual, the codes should be able to be debugged without
target board.

The problem is I can “RUN” and see the result of the “Hello World!”
program, but I can not debug it!

I have many choices in lunch configurations.

  1. C/C++ local: It says, “Failed to lunch CDI debugger…”
  2. C/C++ post morterm debugger: It asks me for a core file. Then I
    create one and offer it. But when it come bakc to the IDE, all the debug
    funcation buttons are disabled.
  3. Should I use the pdebug and qconn? But I think they need to connect
    with target board. (Or maybe I should install something on my PC and
    make it to be the host and target in the sametime???)

Any suggestions?? Thank you!

Ling


\