Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 13-05-2019, 07:21   #1
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Windows stacktrace with windbg

Thank you taruti. I guess I should install & learn winddbg.
I've got it installed, is it necessary to debug using a host and target computers as instructions indicate?
rgleason is offline   Reply With Quote
Old 13-05-2019, 07:57   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Windows stacktrace with windbg

Is opencpn built with



Quote:

free build (or retail build) has relatively small binaries, and the checked build (or debug build) has larger binaries, with more debugging symbols in the code itself. Each of these builds has its own symbol files.
?

determines which set of symbols I get.




Also re Symbols:



Quote:
Often, software companies release two versions of each symbol file: a full symbol file containing both public symbols and private symbols, and a reduced (stripped) file containing only public symbols.

Where would I find those? Are they all pdb files? ie *.pdb



How to "set the sympath, and !analyze -v after the crash."?
rgleason is offline   Reply With Quote
Old 13-05-2019, 08:29   #3
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Windows stacktrace with windbg

Well, I am kind of stumped here how do I load symbols?
I don't see any "Module" in windbg preview and it is unclear to me what to do or what symbols to load!


https://docs.microsoft.com/en-us/win...bugger/symbols
rgleason is offline   Reply With Quote
Old 13-05-2019, 09:11   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Windows stacktrace with windbg

There are no PDB files in a built version of OpenCPN particularly of "Release" Type ! So where do we find the symbol files? Or is this just a hoax to add the Sym files?
rgleason is offline   Reply With Quote
Old 13-05-2019, 09:54   #5
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,208
Re: Windows stacktrace with windbg

Quote:
Originally Posted by rgleason View Post
There are no PDB files in a built version of OpenCPN particularly of "Release" Type ! So where do we find the symbol files? Or is this just a hoax to add the Sym files?
Rick...

Are you sure there is no PDB file if you look at https://ci.appveyor.com/project/bdbc...4069/artifacts ?

You definitely do not need to know anything about even the existence of this stuff, there is so much you can do in other fields, where it makes sense.
nohal is online now   Reply With Quote
Old 13-05-2019, 10:53   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Windows stacktrace with windbg

Taruti replied:
I did the following:
  1. open windbg
  2. Select "Open executable" and select the opencpn.exe and specify command line options (lower in the dialog)
  3. Add symbol paths like .sympath directory-with-opencpn.pdb (not the filename, but the directory).
  4. Optionally .reload
  5. Use g to continue.
  6. After a crash use !analyze -v


Questions:
1. There are no pdb files in the Release Install from Appveyor, so how can there be symbols to link to?
2. Did the output I post have any good information for troubleshooting?
rgleason is offline   Reply With Quote
Old 13-05-2019, 10:57   #7
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Windows stacktrace with windbg

Thanks Pavel. I missed the connection. I'll download it. Once I understand how to do it, I can be of some help!
rgleason is offline   Reply With Quote
Old 13-05-2019, 18:49   #8
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Windows stacktrace with windbg

Pavel:

Quote:
You definitely do not need to know anything about even the existence of this stuff, there is so much you can do in other fields, where it makes sense.

Sure, I'm an Architect. I am committed to help Leamas and you in whatever way possible on this Plugin Installer. I am convinced it will really help.
rgleason is offline   Reply With Quote
Old 13-05-2019, 19:16   #9
Registered User

Join Date: Jul 2005
Location: Bellingham
Boat: Outbound 44
Posts: 9,319
Re: Windows stacktrace with windbg

You have to download the OS symbol files
https://docs.microsoft.com/en-us/win...wnload-symbols
The program symbol files should be output by tbe compiler in pdb files (at least it used to be that way in my windbg days)
__________________
Paul
Paul L is offline   Reply With Quote
Old 14-05-2019, 07:57   #10
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Windows stacktrace with windbg

Paul, the opencpn.pdb file is included with the exe file the way CI appveyor is configured. Pavel pointed that out and I downloaded that 33mb file and have pointed windbg to those symbols. Will that be enough, because the usual online microsoft symbol server is/has moved to azure and it is unclear to me how to access that, it seems to be "coming"..?

I hope the opencpn.pdb file is adequate?


I see in windbg help there is "stacktrace" which can be entered as a command with parameters. (a little too complex for me)
but there is also "Manually Walking a Stack" which looks just like the type of output that Leamas wanted.


Is that what I should be doing?

because when I enter !analyze -v I don't seem to get that type of output.
rgleason is offline   Reply With Quote
Old 14-05-2019, 08:33   #11
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Windows stacktrace with windbg

Also found a command under the !analyze -v


Quote:
The LAST_CONTROL_TRANSFER field shows the last call on the stack. In this case, the code at address 0x01050963 called a function at 0x77F97704. You can use these addresses with the ln (List Nearest Symbols) command to determine what modules and functions these addresses reside in.
The ln List nearest symbols, Which also looks like a call stack.


When I execute !analyze -v after stepping with Go several times to get the program up and loaded (without the toolbar)
I get the output in the attached file:
which starts as "STACK_COMMAND" and shows the failure module as ucrtbase
but this does not look like what Leamas wanted either. He wants a "StackTrace"


Then when I type "ln"
Quote:
(7613c610) ucrtbase!wcsnlen+0x12b | (7613c7c0) ucrtbase!_strnset

Is that like a stacktrace but it only has one line.
Attached Files
File Type: doc Stack-command-1.doc (1.7 KB, 45 views)
rgleason is offline   Reply With Quote
Old 14-05-2019, 15:15   #12
Registered User

Join Date: Jul 2005
Location: Bellingham
Boat: Outbound 44
Posts: 9,319
Re: Windows stacktrace with windbg

To see the portion of the stack trace that falls in the OS you have to have the OS symbols available. I always downloaded them (but this was pre-cloud days). You have to have an exact OS version and symbol match.
__________________
Paul
Paul L is offline   Reply With Quote
Old 14-05-2019, 16:28   #13
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Windows stacktrace with windbg

Quote:
Originally Posted by Paul L View Post
To see the portion of the stack trace that falls in the OS you have to have the OS symbols available. I always downloaded them (but this was pre-cloud days). You have to have an exact OS version and symbol match.

Thanks Paul, I will work on that.
rgleason is offline   Reply With Quote
Reply

Tags
race, wind


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows 4 stable and Windows Beta svzephyr44 OpenCPN 0 29-09-2015 10:46
Plastic Pilothouse Windows? froggman180 Construction, Maintenance & Refit 28 24-03-2010 07:49
Raytech RNS and Windows 7 and Windows XP kene66 Marine Electronics 2 23-02-2010 14:50
Deck Salon/Pilot House Windows and Safety Curtis Monohull Sailboats 1 17-07-2005 20:18
Sweating Windows 1sailaway Construction, Maintenance & Refit 2 10-11-2004 09:49

Advertise Here


All times are GMT -7. The time now is 12:57.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.