Printing Line numbers while dumping stack trace during crash..

Hi,
I want to dump the stack trace of all threads with the line numbers when the program crashes. I am able to do that by cathing the signals and invoking "pstack" utility to dump the stack. But it does not dump the line numbers of each function. Is there some way of doing that?
Thanks
Atul

If you run the executable under dbx then you can type 'where' when the program crashes or set a breakpoint in your signal handler. Line numbers will only show up in the dbx stack trace if the application was compiled with -g and not stripped.

Similar Messages

  • How to get Line numbers in KVM stack traces

    Hello!
    I am fairly new to kvm programming and might have missed the obvious. When my program dumps a stack trace under kvm it gives me an offset (I dont know what the number corresponds to) from the method but not source line numbers like I am used to seeing under J2SE. I complie the code using -g and run it using kvm_g. For example, I see soemething like
    java.lang.NullPointerException
    at myclass.mymethod(+5)
    at parentclass.parentmethod(+10)
    Where I dont know what the +5 or +10 stand for as it relates to my source code.
    Can somebody help with trying to correlate the stack trace to my source code.
    Thanks.
    Ranga.

    I would like to know too. Has anyone found an answer?

  • Is it possible to obtain line numbers in the stack trace of an exception

    Is it possible for e.StackTrace in the following code to contain line numbers?
    try
    catch(Exception e)
    LogStackTrace("Stack Trace:" + e.StackTrace);}
    Hong

    Thank you for your response.
    The linked article is for Windows Phone and it points out "it's not possible to deploy the PDB alongside the EXE/DLL". Is this also the case for Windows Store app, or Windows Store app is different and it can be deployed with a .pdb file as you
    pointed out?
    The Windows Store app package is like the following:
    My App_1.3.0.5_AnyCPU.appxupload
    It is a zip file that contains the following two files:
    My App_1.3.0.5_AnyCPU.appx
    My App_1.3.0.5_AnyCPU.appxsym
    Hong

  • Resolve line numbers from a stack dump

    I have an application with a mutex dead lock. This program is compiled with CC and the flag �g.
    With pstack(pid) I get a proper stack dump with symbol names and hex addresses.
    Is there any way to resolve those hex addresses to line numbers from the source file?
    GNU got a tool named addr2line which solve this problem, is there any corresponding tools for Solaris 10?

    Don't know about addr2line analogue (maybe you can build it on Solaris, too), but there's always an option to use dbx:
    - attach to the process with 'dbx - pid'
    - issue 'where' in dbx console

  • How to print line numbers in NWDS for Java?

    Hi everyone,
    does someone know how to print out program code with line numbers from the Netweaver Developer Studio for Java? This is inevitable for code reviews.
    In Eclipse 3.4 this issue is solved. Is there possibly such a patch for NWDS as well?
    Thanks,
    Maria

    Hi Pascal,
    thanks for the quick reply. The setting you mention displays line numbers on the screen alright, but printing out does not work.
    We use: SAP NetWeaver Developer Studio for SAP NetWeaver 7.1 SP06 PAT0000, Build id: 200807051938.
    I guess it just does not work, because it was fixed only for Eclipse 3.4, and the above NWDS version bases on Eclipse 3.3.
    What do you recommend for code inspections - copy/paste into PSPad or do you know a more comfortable practice?
    Greetings
    Maria

  • ER for jdev1013: JSP line number in exception stack trace

    I'd like to have the JSP line number back in the exception stack trace like in jdev 9052 (and before)
    Sample code to force an exception:
    <%
    request.getParameter("x").length();
    %>
    Output running in JDev 9.0.5.2:
    500 Internal Server Error
    java.lang.NullPointerException
    at default.jspService(default.jsp:2)
    [default.jsp]
    at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:139)
    Output running in JDev 10.1.3 (SU5):
    500 Internal Server Error
    java.lang.NullPointerException
    at default.jspService(_default.java:40)
    [default.jsp]
    at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:60)
    ...

    Hi,
    can you work with customer support to file a bug?
    Thanks
    Frank

  • Can't Redirect -classic thread dump/stack trace

    Hi,
    But how can you redirect the output so you can view it easily, instead of the info just scrolling by into oblivion? I'm using Win98 and JDK1.3.1_02, and w/ the default hotspot jvm, from the console, I could redirect the stack trace/thread dump from standard out (w/c it went into) into a file.
    But w/ the -classic option (from the SDK java version, not the JRE), the stack trace/thread dump does NOT seem to sent to standard out, because I can redirect standard out, but the trace/dump is STILL going to the screen. I have redirected standard err (from w/in my java program) as well, but still no dice!
    Help! TIA,
    Reggie

    Thanks for your reply guys! I also tried redirecting std err from inside my java app. My System.err outputs WERE redirected, but NOT the thread dump - that STILL went to the screen.
    Then I tried the "java 2>error.txt myclass" but win98 thought 2 was the name of my class and threw a NoClassDefFoundError ;-).
    Any more ideas? regards,
    Reggie

  • Printing line numbers in eclipse

    I'm on Windows XP and I must print out the line numbers when I print out source code. However, I can't find how to do this in eclipse. Does anyone know?? I've tried everything.

    never mind... I found it

  • JSP stack trace line numbers?? used to be there?

    I could have swore that JDev RC showed line numbers in JSP
    stack traces?
    Anyway, they'd be great. How can the JIT/ojvm be configured to
    make them available to the actual .jsp line numbers.
    Thanks, curt

    The line numbers are there if you aren't using the jsp include tag:
    <%@ include file="some.jsp" %>
    Since this is a compile time include, I still feel that line numbers should be
    present in the stack trace... Well, I wish they were anyway.
    Thanks, curt Curt:
    This depends on which JVM you are using. For 9.0.2, I believe ojvm does not give line numbers. (I think we are changing to show line numbers for 9.0.3.) If you use hospot ('java -hotspot ...') you should see the line numbers.
    Thanks.
    Sung

  • How to print continue Line Numbers  in PLD  Differen repetitve areas.

    Hi,
    We need to print line numbers continues in different Repetitive areas.
    Ex. Repetitve Area 0 we have item Discriptions
          Repetitve Area  Footer1 we created sotvalue() here it will display servicetaxes
          Repetitve Area Footer1 we created one text roundoff
    we need output like
    Ex:1. Dell        **Repetitve Area 0****           
          2.Mouse     **Repetitve Area 0****           
          3.Laptop      **Repetitve Area 0****             
          4.servicetax   **Repetitve Area Footer1****           
          5.cess             **Repetitve Area Footer1****           
          6.Hcess             **Repetitve Area Footer1****           
          7.Roundoff           **Repetitve Area Footer1****    as a text field       
      for above all we need to print Line numbers sequence how we can print sequence numbers for differen  areas.if i  assigned Linenum( ) in Repetitve Area 0 it will display one for Repetitve Area 0 only.and i applied Gouplinenum also it's not printing. please guide me how to print this.
    regds,
    sampath kumar devunuri.

    Hi,clint pow.
    Please we did what you said but we are not retreiving data.please tell me how we can get serieal numbers for different repetitve areas.
    regds,
    sampath.

  • NullPointerException without stack trace

    The Java stack trace can be very suitable to find the error path. However, I get NullPointerExceptions without a stack trace! If I catch a Throwable in my main() method I can print the exception, but the stack trace is empty:
    try {
    } catch (Throwable t) {
    System.out.println("ERROR: "+t); //does print "java.lang.NullPointerException"
    t.printStackTrace(); //also just prints 1 line with "java.lang.NullPointerException"
    }I thought, a stack trace is always available?

    When I want to add a comment to this "RFE" (!!!), I just get a "We encountered an unexpected error. Please try back again. " ... there are "fixed" bug ID links:
    Release Fixed 1.4.2_05(Bug ID:2120657) , tiger-beta2(Bug ID:2120658)
    But I use 1.4.2_05 and it happend there ...

  • Problems with line numbers (building via ant).

    We use ant for our builds and are having a problem with getting line numbers into call stacks. When running on linux we do not get the lines for our projects (not all projects have debug option), just (Unknown Source), however we do see line numbers for the tib jars. Eclipse is fine, we can see all line numbers as appropriate.
    I have tried "lines", "lines,source" and "lines,var,source" - all build a different sized jar which suggest something is getting added. However as we see line nums for tib it suggests it's some strange java runtime option. We're using sunjdk 1.5.10 and also jrockit.
    Any ideas/answers most appreciated.
    Many thanks, Declan
    Ant task
    <target name="compile" depends="init">
         <javac target="1.5" destdir="${classes}" debug="on" debuglevel="lines,source">
              <src path="${src}"/>               
              <classpath refid="default.classpath"/>
         </javac>     
         <javac target="1.5" destdir="${classes-test}" debug="on" debuglevel="lines,source">
              <src path="${testsrc}"/>
              <classpath refid="default.classpath"/>
              <classpath location="${classes}"/>
         </javac>
    </target>
    Example output
    java.lang.IllegalArgumentException: Field data is null
    at com.tibco.tibrv.TibrvMsg._addImpl(TibrvMsg.java:1503)
    at com.tibco.tibrv.TibrvMsg.add(TibrvMsg.java:1020)
    at com.lehman.fid.jdt.channel.tibrv.TibrvMessage.putObject(Unknown Source)
    at com.lehman.cmd.etrading.orderbook.dp.DefaultDepthPublisher.buildSubMessage(Unknown Source)
    at com.lehman.cmd.etrading.orderbook.dp.DefaultDepthPublisher.buildSubMessage(Unknown Source)
    at com.lehman.cmd.etrading.orderbook.dp.DefaultDepthPublisher.publishDepth(Unknown Source)
    Cmd line
    VM_OPTS="-Dlogfile=../../log/CmdOrderBook.log"
    VM_OPTS="${VM_OPTS} -Dcom.sun.management.jmxremote"
    VM_OPTS="${VM_OPTS} -Dcom.sun.management.jmxremote.authenticate=false"
    VM_OPTS="${VM_OPTS} -Dcom.sun.management.jmxremote.password=false"
    VM_OPTS="${VM_OPTS} -Dcom.sun.management.jmxremote.ssl=false"
    PARAMS="-springcfg orderbook-context.xml -instancename CmdOrderBook"
    exec ${JAVA_HOME}/bin/java -DappInstance=CmdOrderBook -server -Xmx500M -Xms250M -Xincgc ${VM_OPTS} com.lehman.cmd.etrading.orderbook.CommoditiesOrderBook ${PARAMS} >> ../../log/Cm
    dOrderBook.out 2>&1

    We use ant for our builds and are having a problem with getting line numbers into call stacks. When running on linux we do not get the lines for our projects (not all projects have debug option), just (Unknown Source), however we do see line numbers for the tib jars. Eclipse is fine, we can see all line numbers as appropriate.
    I have tried "lines", "lines,source" and "lines,var,source" - all build a different sized jar which suggest something is getting added. However as we see line nums for tib it suggests it's some strange java runtime option. We're using sunjdk 1.5.10 and also jrockit.
    Any ideas/answers most appreciated.
    Many thanks, Declan
    Ant task
    <target name="compile" depends="init">
         <javac target="1.5" destdir="${classes}" debug="on" debuglevel="lines,source">
              <src path="${src}"/>               
              <classpath refid="default.classpath"/>
         </javac>     
         <javac target="1.5" destdir="${classes-test}" debug="on" debuglevel="lines,source">
              <src path="${testsrc}"/>
              <classpath refid="default.classpath"/>
              <classpath location="${classes}"/>
         </javac>
    </target>
    Example output
    java.lang.IllegalArgumentException: Field data is null
    at com.tibco.tibrv.TibrvMsg._addImpl(TibrvMsg.java:1503)
    at com.tibco.tibrv.TibrvMsg.add(TibrvMsg.java:1020)
    at com.lehman.fid.jdt.channel.tibrv.TibrvMessage.putObject(Unknown Source)
    at com.lehman.cmd.etrading.orderbook.dp.DefaultDepthPublisher.buildSubMessage(Unknown Source)
    at com.lehman.cmd.etrading.orderbook.dp.DefaultDepthPublisher.buildSubMessage(Unknown Source)
    at com.lehman.cmd.etrading.orderbook.dp.DefaultDepthPublisher.publishDepth(Unknown Source)
    Cmd line
    VM_OPTS="-Dlogfile=../../log/CmdOrderBook.log"
    VM_OPTS="${VM_OPTS} -Dcom.sun.management.jmxremote"
    VM_OPTS="${VM_OPTS} -Dcom.sun.management.jmxremote.authenticate=false"
    VM_OPTS="${VM_OPTS} -Dcom.sun.management.jmxremote.password=false"
    VM_OPTS="${VM_OPTS} -Dcom.sun.management.jmxremote.ssl=false"
    PARAMS="-springcfg orderbook-context.xml -instancename CmdOrderBook"
    exec ${JAVA_HOME}/bin/java -DappInstance=CmdOrderBook -server -Xmx500M -Xms250M -Xincgc ${VM_OPTS} com.lehman.cmd.etrading.orderbook.CommoditiesOrderBook ${PARAMS} >> ../../log/Cm
    dOrderBook.out 2>&1

  • Line numbers on Discoverer Portlet

    When I create a Discoverer Portlet in the Portal, the worksheet is displayed with a line number that I cannot control. In Discoverer Plus, you have the option to supress line numbers while building a worksheet, but when you deploy a worksheet to the Portal (via the Discoverer Portlet provider), you get the line numbers no matter what.
    The problem is that the line numbers that are automatically added are in a 11 or 12 point font so it makes each row much taller than I need it to be.
    Is there any way to supress these line numbers?
    Thanks,
    TGF

    This is a known issue in Discoverer portlets and we are working on a resolution.
    Regards
    Oracle Discoverer Procuct Management

  • Line numbers in script

    hi gurus,
             how can i print line numbers in serial in vertical in a SAP Script.
                        thanx in advance,
                                santosh.

    Hi
    There is no system field for writing the Numbers in Scripts like Reports.
    check the table TTSXY and TTDTG  if needed..
    So you define some variable using DEFINE statement and based on some Item condition you have to pass varaible
    /: define &VAR&
    /: if &itab-posnr& eq '00010'
    / var  = 1.
    elseif &itab-posnr& eq '00020'
    / var = 2.
    /: elseif &itab-posnr& eq '00030'
    / var  = 3.
    endif.
    try like above and pass the numbers
    or from the driver program itself keep a variable in the items internmal table and fill that field and use it in script.
    <b>
    Reward points for useful Answers</b>
    Regards
    Anji

  • Stack trace gives line numbers when src is present in package hierachy?

    hi,
    does anyone know why the lines numbers of the source code are only given in exception traces when the source code is present alongside the class files in the package hierachy?
    I'm guessing this is because there is not enough information in the class files alone?
    in which case, how does it work with the source file present??
    thanks,
    asjf

    It has nothing to do with source code files... forget that idea completely.
    However, it may be something to do with your just-in-time compiler.
    At runtime, HotSpot might compile the java byte code ( solely in your class file ) into native/machine code and thus lose the line number information during that internal translation.
    Try running your application with the -Xint parameter for java.exe. It will turn off the Just-in-time compiler so you should
    get the line number information. ( assuming you compiled the class files with javac -g )

Maybe you are looking for

  • Retrieving data from a "varchar(4000)" field w/ JDBC

    I'm using the Oracle thin JDBC drivers w/ the 1.1.8 JDK. In the past when needing to access "LONG" fields with over 2000 bytes of data I used the "rs.getAsciiStream(xx)" method and read the data from the STREAM. A later version of the thin drivers al

  • How to handle interactive list in alv reports

    hi experts. how to handle interactive list in alv reports. regards. subhasis

  • Ad hoc connexion between MBP and Canon WFTE2

    Hi there Impossible to make an ad hoc wifi connexion between my computer and my Canon wft (wifi files transmitter), at the begining everything goes fine , computer find my camera and camera find my computer , when I connect both ; I'm losing the conn

  • WSDL connection to call a Webservice --urgent

    Hi , 1) Created a interactive form in using form builder 2) The form is genearted and the the purpose is to save the data in a online mode from a PDF forms directly . 3) an RFC FM is created in backend and planning to invoke this from the PDF forms .

  • Later versions of Photoshop & Lightroom

    Dear Adobe, I have been using your products for some time now, mainly Photoshop, but I have also used light room. Recently I have downloaded both products from your web site on trial; unfortunately my current computer does not support these products,