• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Libmanager callback always prints stack trace despite errset...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 2085
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Libmanager callback always prints stack trace despite errset()

AM202408156233
AM202408156233 6 months ago

I have a callback that gets called from a menu item in Library Manager (menu defined via cdsLibMgr.il)

Inside this callback, I have an errset() block that always prints out a stack trace when the callback is called from within libmanager.

If I call the callback directly from the CIW, no stack trace.

in both cases the callback completes successfully, it's just that when called from libmanager, it pollutes the screen with needless stack trace possibly obscuring any real errors.

I've tried adding uninstallDebugger() and "skill_stacktrace=0" into the callback, I still get a stack trace.

Does anyone know of a way to disable these stack traces?

  • Cancel
  • Andrew Beckett
    Andrew Beckett 6 months ago

    Can you check what you get if you enter this in the CIW:

    status(errsetTrace)

    Normally this would be nil, but if it's been set to t for some reason then it will show a stack trace for errors caught by errset. I don't see this being enabled just because of using library manager customisation though.

    Note, I think the variable for general stack traces is _stacktrace (I think that's a typo in the manual).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AM202408156233
    AM202408156233 6 months ago in reply to Andrew Beckett

    yeah, that did it, can you please have them fix the documentation?

    kinda annoying that libmanager introduces a different execution context

    procedure(_amCopyStdCellToRelease(caller, libName, cellName, @rest extra)
    prog(()
    printf("_stacktrace:%L\n", _stacktrace);
    printf("errsetTracePre: %L\n", status(errsetTrace))
    errset(error("test"), t);
    printf("errsetTracePost:%L\n", status(errsetTrace))
    ))

    via CIW:

    _amCopyStdCellToRelease(nil, nil, nil)
    _stacktrace:0
    errsetTracePre: nil
    *Error* test
    errsetTracePost:nil
    nil

    via LibManager:

    _stacktrace:10
    errsetTracePre: nil
    *Error* test
    <<< Stack Trace >>>
    error("test")
    funobj@0x4c3adf70()
    errset(lambda(nil error("test")) t)
    prog((objSch objSym objFun objLay objTag ... ) printf("_stacktrace:%L\n" _stacktrace) printf("errsetTracePre: %L\n" status(errsetTrace)) errset(lambda(nil error("test")) t) printf("errsetTracePost:%L\n" status(errsetTrace)))
    _amCopyStdCellToRelease("amCopyReleaseCell" "testlib" "test" "" "" ... )
    (... in ddsiLMCEval ...)
    (... in ddsLMCMenuItem ...)
    ddsLMCMenuItem(20 "amCopyReleaseCell" "_amCopyStdCellToRelease" ("testlib" "test" "" "" ""))
    errsetTracePost:nil

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett 6 months ago in reply to AM202408156233

    That's not us that's doing that - the _stacktrace variable should not be different in each case - I can only imagine you have something in your environment which is setting _stacktrace.

    Note that the stacktrace is also only showing because you have t as the second argument to errset.

    I'll press the feedback button on the documentation to get that corrected.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AM202408156233
    AM202408156233 6 months ago in reply to Andrew Beckett

    That was my first thought too, that maybe SOS was mucking things up.

    The above behavior was verified in a base environment without any addons or PDKs

    Also, this is ICADV20.1-64b.500.34

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett 6 months ago in reply to AM202408156233

    I take it all back. It is us doing this. In the code which executes the callback on the Virtuoso side from the library manager, it temporarily sets _stacktrace to 10 and then restores it afterwards. I didn't see this initially because I didn't have t as the second argument to errset and then I (rather stupidly) changed _stacktrace myself and added the t at the same time - so I assumed it was me doing this.

    The good news is that there's a simple workaround. Do this:

    procedure(_amCopyStdCellToRelease(caller, libName, cellName, @rest extra)
      let(((_stacktrace 0))
        printf("_stacktrace:%L\n", _stacktrace);
        printf("errsetTracePre: %L\n", status(errsetTrace))
        errset(error("test"), t);
        printf("errsetTracePost:%L\n", status(errsetTrace))
      )
    )

    What this will do is dynamically scope the _stacktrace variable to override the global, and then it will be restored at the end of the callback (strictly, the end of the let) and that means that the stack trace won't be shown.

    I have reported the typo too BTW.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information