×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Registered User
    Join Date
    Feb 2006
    Location
    Moscow, Russia
    Posts
    24

    Question How debug with Carbide.c++?

    I use Carbide.c++ for about a month and never debugged any application before. Today I decided to try to debug simply little "Hello world!" like proggy and was failed. I was unable to load emulator executable into Carbide.c++ debugger, neither stepping nor any source view was available. Little proggy just ran and no one of my breakpoints affected it, they were completely ignored. Seems like there were no symbol info in that proggy but it really was there. Why? What have I done wrong? I did all the tutorial steps and got nothing at all.

  2. #2
    Nokia Developer Expert
    Join Date
    Dec 2004
    Location
    Austin, TX
    Posts
    399

    Re: How debug with Carbide.c++?

    First you should try to follow the tutorial in the Carbide.c++ User Guide. The specific step you are missing is "Creating a Debug Configuration". It sounds like you are creating a run config and not a debug config.

    Cheers,
    Tim

  3. #3
    Registered User
    Join Date
    Feb 2006
    Location
    Moscow, Russia
    Posts
    24

    Re: How debug with Carbide.c++?

    I did read the tutorial again and again, followed exactly as noted therein, did "Creating a Debug Configuration" many times and still couldn't run Carbide.c++ debug session. Program just runs and no traps/breakpoints available. There ARE debug symbols inside built application, I've checked for it:

    Code:
    C:\...\udeb\z\system\apps\HelloCarbide>tdump -e HelloCarbide.app
    
    Turbo Dump  Version 5.0.16.12 Copyright (c) 1988, 2000 Inprise Corporation
                     Display of File HELLOCARBIDE.APP
    
    [...]
    
    Exports from HelloCarbide.app
      1 exported name(s), 1 export addresse(s).  Ordinal base is 1.
      Sorted by Name:
        RVA      Ord. Hint Name
        -------- ---- ---- ----
        00001050    1 0000 ?NewApplication@@YAPAVCApaApplication@@XZ
    
    CodeView symbols (CV4)
    
    SubSection Directory - Offset: 00029BDC
        ModIndex: 0001  FileOffs: 0000F008  Size: 000AC  Type: sstModule
        ModIndex: 0002  FileOffs: 0000F0B4  Size: 0013E  Type: sstModule
        ModIndex: 0003  FileOffs: 0000F1F4  Size: 0009A  Type: sstModule
        ModIndex: 0004  FileOffs: 0000F290  Size: 000ED  Type: sstModule
        ModIndex: 0005  FileOffs: 0000F380  Size: 0002F  Type: sstModule
    
    [...]
    
    ModIndex: FFFF  FileOffs: 0001FDFC  sstLibraries
    0001  edll.lib
    0002  euser.lib
    0003  apparc.lib
    0004  cone.lib
    0005  eikcore.lib
    0006  avkon.lib
    0007  eikcoctl.lib
    0008  MSL_ALL_MSE_Symbian.lib
    0009  gdi32.lib
    000A  user32.lib
    000B  kernel32.lib
    
    --------------------------------
    ModIndex: FFFF  FileOffs: 0001FE84  sstGlobalTypes
    Strange sstGlobalTypesTable
    
    --------------------------------
    ModIndex: FFFF  FileOffs: 00028580  sst*??*
    
    --------------------------------
    ModIndex: FFFF  FileOffs: 000295D8  sstMystery1
    
    --------------------------------
    ModIndex: FFFF  FileOffs: 00029690  sst*??*
    So symbols are there, but Carbide.c++ debugger does not work.

  4. #4
    Super Contributor
    Join Date
    Sep 2004
    Posts
    1,048

    Re: How debug with Carbide.c++?

    Well, if you are sure you did the correct steps (build for Emulator, then select the little "green bug" that was created, then right click, then Debug.., then in the view that opens first click New in the lower left hand corner and then Debug in the lower right hand corner, then wait for emulator to start up and then start the application from the phone UI on the emulator), then are you sure that your application does hit the breakpoints that you have set?

  5. #5
    Registered User
    Join Date
    Feb 2006
    Location
    Moscow, Russia
    Posts
    24

    Re: How debug with Carbide.c++?

    Yes, I did everything that tutorial notes about debugging. Application does never stop on any breakpoint. I set breakpoints on NewApplicatin(), AppView::ConstructL() and thought it should break at least there, but it does not.

  6. #6
    Super Contributor
    Join Date
    Sep 2004
    Posts
    1,048

    Re: How debug with Carbide.c++?

    Try to put a breakpoint in XxxxAppUi::HandleCommandL, in the switch-case, they should then break whenever you do something from the Menu.

  7. #7
    Registered User
    Join Date
    Feb 2006
    Location
    Moscow, Russia
    Posts
    24

    Re: How debug with Carbide.c++?

    I did it, too. I put breakpoint inside HandleCommandL in the switch. It does not trigger, also. I feel I do wrong something but I can not figure out what I can do wrong exactly.

  8. #8
    Super Contributor
    Join Date
    Sep 2004
    Posts
    1,048

    Re: How debug with Carbide.c++?

    Make sure that you only have one project open in your workspace by closing all projects with "Close project" and then create a new simple project.
    Then - in your own words - describe, step-by-step, what you do with that newly created project?

  9. #9
    Registered User
    Join Date
    Feb 2006
    Location
    Moscow, Russia
    Posts
    24

    Re: How debug with Carbide.c++?

    There are no other projects at all, only one.

    1) I build it as "Project->Build project"
    2) I click right mouse button on project name in C/C++ Project window and choose "Debug As->Debug..."
    3) Within new window I just press "New" button and then "Debug" button
    4) Emulator starts, Debug Perspective opens but I see no source file there so I switch into C/C++ Perspective and click on, say, HelloCarbideAppUi.cpp
    5) Then I switch back in Debug Perspective
    6) Here is HelloCarbideAppUi.cpp window appears, but I cannot set any breakpoint because debugger (?) is still running
    7) I do "Run->Terminate" and now I am able to set breakpoint
    8) I set breakpoint in the CHelloCarbideAppUi::HandleCommandL switch statement
    9) Now I do "Debug Last Launched" (F11), Emulator starts again
    10) That's all, Emulator runs, application inside it runs, breakpoint(s) is/are skipped away.

  10. #10
    Super Contributor
    Join Date
    Sep 2004
    Posts
    1,048

    Re: How debug with Carbide.c++?

    Hi,


    OK - 1) I build it as "Project->Build project"
    OK - 2) I click right mouse button on project name in C/C++ Project window and choose "Debug As->Debug..."
    OK - 3) Within new window I just press "New" button and then "Debug" button
    OK - 4) Emulator starts, Debug Perspective opens but I see no source file there so I switch into C/C++ Perspective and click on, say, HelloCarbideAppUi.cpp

    You can set breakpoints in any perspective, also the Symbian perspective:
    Not needed - 5) Then I switch back in Debug Perspective

    The next step I do not understand, you should be able to set breakpoints even while the emulator starts up, just double-click in the grey border. You can also set breakpoints well before you start the debugger. Why can't you set breakpoints?

    ?? - 6) Here is HelloCarbideAppUi.cpp window appears, but I cannot set any breakpoint because debugger (?) is still running
    Should not be needed - 7) I do "Run->Terminate" and now I am able to set breakpoint

    OK - 8) I set breakpoint in the CHelloCarbideAppUi::HandleCommandL switch statement
    OK - 9) Now I do "Debug Last Launched" (F11), Emulator starts again

    However, this yet does not start the application, you must go to the emulator, find the application and launch it as if you were using a phone before it will start, did you do that?
    Application start missing? - 10) That's all, Emulator runs, application inside it runs, breakpoint(s) is/are skipped away.

  11. #11
    Registered User
    Join Date
    Feb 2006
    Location
    Moscow, Russia
    Posts
    24

    Re: How debug with Carbide.c++?

    I couldn't set breakpoint while the emulator was running. Setting breakpoits via menu was disabled (greyed), double clicking on the source line flashed breakpoint mark (a circle) for a moment and hid it at once.

    Of cource I launched the application in emulator as last step, I just did not note that, it's obvious
    Last edited by c0deab1e; 2006-03-31 at 14:08.

  12. #12
    Super Contributor
    Join Date
    Sep 2004
    Posts
    1,048

    Re: How debug with Carbide.c++?

    Sorry that I suspected that you had not started the app, just runnig out of ideas on what could be the issue...

    But still, when you do the F11, you do have some breakpoints set (at least one small blue circle in the grey border)? In this case it should at least stop on those.

    If you open up the Breakpoint view (click on the Breakpoints tab in the top righthand side window), can you see the breakpoints there?

  13. #13
    Registered User
    Join Date
    Feb 2006
    Location
    Moscow, Russia
    Posts
    24

    Re: How debug with Carbide.c++?

    Yes, I have small blue circles left to source lines and the Breakpoint View shows source line numbers with breakpoints activated. I think I should try to reinstall SDK/Carbide.c++, maybe it will help.

  14. #14
    Registered User
    Join Date
    Feb 2006
    Location
    Moscow, Russia
    Posts
    24

    Re: How debug with Carbide.c++?

    I reinstalled only Carbide.c++, not SDK, and everything works now! I was able to start debugging session Ok.

  15. #15
    Registered User
    Join Date
    Apr 2006
    Posts
    4

    Re: How debug with Carbide.c++?

    I'm having similar problems with carbide, even reinstallation won't work. Is there any workaround to this problem? Debugger doesn't seem to react to the breakpoints in any way.

    Another peculiar thing is that IDE doesn't always build the project but it has to be cleaned even to enable the "build" menu item..

Similar Threads

  1. How to debug console application with CW3.1 and 3rd edition ?
    By 3rdparty in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2006-06-16, 13:54
  2. How to debug console application with CW3.1 and 3rd edition ?
    By 3rdparty in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2006-02-01, 17:40
  3. WAP upload / Content-Type header is lost at WAP gateway
    By rabai in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2004-02-24, 11:59
  4. using th debug monitor
    By evertse in forum Symbian
    Replies: 0
    Last Post: 2003-10-22, 08:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×