Results 1 to 3 of 3

Thread: How to find location in code from address

  1. #1
    Join Date
    Nov 2009
    Posts
    68
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded

    Default How to find location in code from address

    I have a program that I get a SEGV fault from. It only happens once in a while on a customer site so connecting to a debugger is not an option.

    I have captured the Address of the segmentation fault using segaction.

    Is there anyway to use this address to determine where in my code the SEGV occurred?

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,229
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to find location in code from address

    Is there anyway to use this address to determine where in my code the SEGV occurred?
    I don't know how you could use this information. I think the address is an actual memory address, not a relative one, so it would depend on the environment on the customer machine at the time the crash occurred. In addition, the debug vs. release mode memory layouts are likely to be different because of the additional code the compiler and linker add to support debugging.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to find location in code from address

    Quote Originally Posted by weaver4 View Post
    I have a program that I get a SEGV fault from.
    Linux? Is the program writing a core file on crash? You could possibly use the core file. You may need to set the core file size ulimit greater than zero to get one, and it would probably help if the user was running a debug build
    https://unix.stackexchange.com/quest...n-linux/202443

Similar Threads

  1. How to find the local IP (LAN) address of the PC
    By andreaQt in forum Qt Programming
    Replies: 10
    Last Post: 13th May 2019, 18:05
  2. Replies: 4
    Last Post: 28th February 2016, 11:56
  3. Find and Send User Current Location like Viber with QT
    By hasti in forum Qt for Embedded and Mobile
    Replies: 5
    Last Post: 28th September 2014, 08:28
  4. How to find the location of the user?
    By nikhilqt in forum Qt Programming
    Replies: 7
    Last Post: 14th December 2010, 19:22
  5. IP address find
    By kpmsivachand in forum Qt Programming
    Replies: 6
    Last Post: 21st February 2009, 19:11

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.