1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Anyone used SymGetLineFromAddr64?

Discussion in 'Programming' started by davedx, Apr 11, 2005.

  1. #1
    Trying to get a stack trace, but I'm missing the function the crash occurs in (everything else works). So I'm using SymGetLineFromAddr64 and notice there's a variable called "displacement", which returns nonzero numbers for the functions close to the crash - anyone know what it actually represents? Bytes from the instruction? Lines from the current line number? MSDN isn't much help :confused: :eek:

    Actually nvm - it's the byte offset in instructions from the line number in source code. Still having trouble getting the function it crashed in though - anyone done this before? :D
     
    davedx, Apr 11, 2005 IP
  2. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Use MS' symbol server to figure out where the crash is, if it's somewhere in the system code. If you are using WinDbg, you can get the next and the previous symbols using the ln command.

    In general, the function you are referring to, among others, is there for those who write debuggers and other system tools. Unless you are one of these people, you need to use some tools, like WinDbg.

    Tracking a crash is a tricky business, especially if you are dealing with high-level languages, like Java or C#. If you've never done this before, you might want to find someone to help you with this (unless it's something easy, like a NULL pointer or a division by zero).

    J.D.
     
    J.D., Apr 11, 2005 IP
  3. davedx

    davedx Peon

    Messages:
    429
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the reply JD - somehow I thought you would be the one to reply :D

    It's a c++ application in a gamedev library (Renderware), so it's something like this:
    system->directx->renderware->application
    In terms of layers. The test crash I was trying to get a trace on is in the application layer - I did a divide by zero - and it works great, except for not reporting the function the div is in, only the one that called it.

    Oh well, I'll have another look into it today probably. We're trying to get it working properly by the end of the month as we're moving into testing phase soon, and want the testers to be able to report exactly where crashes occur in the code.
     
    davedx, Apr 13, 2005 IP