From 47bccb1b8664582ce9d3e54c65a3dff1b65322a5 Mon Sep 17 00:00:00 2001 From: "dp%netscape.com" Date: Sat, 3 Apr 1999 17:10:21 +0000 Subject: [PATCH] Added alecf unix debugging tips git-svn-id: svn://10.0.0.236/trunk@26143 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/doc/xpcom-code-faq.html | 36 +++++++++++++++++++-------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/mozilla/xpcom/doc/xpcom-code-faq.html b/mozilla/xpcom/doc/xpcom-code-faq.html index d270c9cb363..56e09474142 100644 --- a/mozilla/xpcom/doc/xpcom-code-faq.html +++ b/mozilla/xpcom/doc/xpcom-code-faq.html @@ -136,9 +136,8 @@ to exist. Hence the notion of getting a service not creating one. (as opposed to the notion of Creating instances with the componentManager). ServiceManager is a convenience because components can technically force singletonism by making their factory return the same instance if one was created already. -The -other big use of ServiceManager is the (still unimplemented) notion of -Shutting down a service. +The other big use of ServiceManager is the (still unimplemented) notion +of Shutting down a service.

Client

@@ -246,7 +257,9 @@ ProgIDs (not implemented yet).
  • Should CreateInstance() calls use ProgID or CLSID
  • -


    ProgID is what Clients should use to CreateInstances. Clients should +
      +

      +

    ProgID is what Clients should use to CreateInstances. Clients should not even know about the CLSID unless they are hell bent on creating a particular implementation of a component.
    - @@ -255,7 +268,9 @@ implementation of a component.

  • Should Components register with both a CID and ProgID
  • -


    Absolutely. +
      +

      +

    Absolutely.

    @@ -263,10 +278,9 @@ implementation of a component.
    Since components are dynamically loaded only on demand, debugging them could be a hard. Here are some tips to debugging components. -

    Windows: VC5.0 VC6.0 +

    Windows: VC5.0 VC6.0

      Include your component library in the Project->Settings, Additional -Dll. drop down. After that breakpoints can be enabled. -
       
    +Dll. drop down. After that breakpoints can be enabled. Unix: gdb
    Let the program run until you are sure that your component is loaded. Type Control-C. Now all symbols from your component will be @@ -274,8 +288,10 @@ available in gdb. Put your breakpoints and restart the app. Gdb will complain that it cannot set the breakpoint, and that it is temporarily disabling it, but when the *.so is loaded, the breakpoint is enabled automatically. - <Eric Van Der Poel> -
     
    -Mac: Codewarrior +

    I think typing "dir components" (assuming you're in dist/bin) will also +allow you to see the symbols in your stack the first time. - <Alec +Flett>

    +Mac: Codewarrior
    Just open the appropriate .xSYM file in the debugger; the debugger will target the library when the application is run. - <Simon Fraser>