diff --git a/docbook/wsdg_src/WSDG_chapter_quick_setup.asciidoc b/docbook/wsdg_src/WSDG_chapter_quick_setup.asciidoc index e7ffdc2983..b29efc98d3 100644 --- a/docbook/wsdg_src/WSDG_chapter_quick_setup.asciidoc +++ b/docbook/wsdg_src/WSDG_chapter_quick_setup.asciidoc @@ -131,7 +131,7 @@ OpenGL'' component is used to build the official 64-bit packages. Note that the Qt package also includes the Qt Creator IDE, which is useful for designing graphical components and includes an interactive debugger. -You'll need to build wireshark using nmake before you'll be able to build the +You'll need to build Wireshark using nmake before you'll be able to build the Wireshark project (uiqtWireshark.pro), however. You can also use Chocolatey to install Qt (there are packages for x86 & x64 and various MSVC compilers, e.g. @@ -317,7 +317,8 @@ Make sure your repository path doesn't contain spaces. ==== Open a Visual Studio Command Prompt From the Start Menu (or Start Screen), navigate to the Visual Studio 2013 -> -Visual Studio Tools directory and choose the Command Prompt appropriate for the build you wish to make, e.g. VS2013 x86 Native Tools Command Prompt for a 32 bit version. +Visual Studio Tools directory and choose the Command Prompt appropriate for +the build you wish to make, e.g. VS2013 x86 Native Tools Command Prompt for a 32 bit version. [TIP] .Pin the items to the Task Bar @@ -330,7 +331,8 @@ All subsequent operations take place in this Command Prompt window. . Set environment variables to control the build. + -- -Set the following env vars, using paths and values suitable for your installation +Set the following environment variables, using paths and values suitable for your installation: + ---- > set CYGWIN=nodosfilewarning > set WIRESHARK_BASE_DIR=C:\Development @@ -382,6 +384,14 @@ Enter at the Visual Studio Command prompt line: This will check for the various tools needed to build Wireshark: ---- + +Microsoft (R) Program Maintenance Utility Version 12.00.21005.1 +Copyright (C) Microsoft Corporation. All rights reserved. + + +ERROR: The contents of 'E:\Wireshark\Wireshark-win32-libs\current_tag.txt' is (unknown). +It should be 2014-10-01. + Checking for required applications: cl: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/BIN/cl link: /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/BIN/link @@ -395,13 +405,16 @@ Checking for required applications: peflags: /usr/bin/peflags perl: /usr/bin/perl C:\Python27\python.exe: /cygdrive/c/Python27/python.exe - C:\Qt\Qt5.3.0\msvc2013\bin\qmake: /cygdrive/c/Qt/Qt5.3.0/5.3/msvc2013/bin/qmake + C:\Qt\Qt5.3.0\5.3\msvc2013\bin\qmake: /cygdrive/c/Qt/Qt5.3.0/5.3/msvc2013/bin/qmake sed: /usr/bin/sed unzip: /usr/bin/unzip wget: /usr/bin/wget ---- -If you have problems with all the first three items (cl, link, nmake), check that you opened a Visual Studio Command Prompt <>. +The "ERROR" at the start occurs because you haven't yet downloaded the third +party libraries and it can be ignored at this stage. +If you have problems with all the first three items (cl, link, nmake), check +that you opened a Visual Studio Command Prompt <>. Unfortunately, the `link` command is defined both in Cygwin and in MSVC, each with completely different functionality. You'll need the MSVC link. If your link diff --git a/docbook/wsdg_src/WSDG_chapter_tools.asciidoc b/docbook/wsdg_src/WSDG_chapter_tools.asciidoc index 61a2e49c3d..b70fe25fd5 100644 --- a/docbook/wsdg_src/WSDG_chapter_tools.asciidoc +++ b/docbook/wsdg_src/WSDG_chapter_tools.asciidoc @@ -27,7 +27,7 @@ tools are available in different "flavours": * Windows native: some tools are available as native Windows tools, no special emulation is required. Many of these tools can be installed (and updated) using http://chocolatey.org[Chocolatey], a Windows package manager similar - to the linux package managers apt-get or yum. + to the Linux package managers apt-get or yum. [WARNING] .Follow the directions @@ -85,7 +85,7 @@ through a single utility, 'setup-x86.exe' for 32-bit Windows and The native Windows tools will typically be a bit faster but more complicated to install, as you would have to download the tools from different web sites and -install and configure them them individually. +install and configure them individually. [NOTE] @@ -161,8 +161,7 @@ between: ==== gcc (GNU compiler collection) The GCC C compiler is available for most of the -UNIX-like platforms and as the Devel/gcc package from the -<>. +UNIX-like platforms. If GCC isn't already installed or available as a package for your platform, you can get it at: @@ -178,8 +177,8 @@ $ gcc --version should result in something like ---- -gcc (GCC) 3.4.4 (cygwin special) (gdc 0.12, using dmd 0.125) -Copyright (C) 2004 Free Software Foundation, Inc. +gcc (Ubuntu 4.9.1-16ubuntu6) 4.9.1 +Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ---- @@ -191,9 +190,7 @@ Your version string may vary, of course. ==== gdb (GNU project debugger) GDB is the debugger for the GCC compiler. It is -available for many (if not all) UNIX-like platforms and as -the Devel/gdb package from the -<> +available for many (if not all) UNIX-like platforms. If you don't like debugging using the command line there are some GUI frontends for it available, most notably @@ -212,13 +209,20 @@ $ gdb --version should result in something like: ---- -GNU gdb 6.5.50.20060706-cvs (cygwin-special) -Copyright 2003 Free Software Foundation, Inc. -GDB is free software, covered by the GNU General Public License, and you are -welcome to change it and/or distribute copies of it under certain conditions. -Type "show copying" to see the conditions. -There is absolutely no warranty for GDB. Type "show warranty" for details. -This GDB was configured as "i686-pc-cygwin". +GNU gdb (Ubuntu 7.8-1ubuntu4) 7.8.0.20141001-cvs +Copyright (C) 2014 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. Type "show copying" +and "show warranty" for details. +This GDB was configured as "x86_64-linux-gnu". +Type "show configuration" for configuration details. +For bug reporting instructions, please see: +. +Find the GDB manual and other documentation resources online at: +. +For help, type "help". +Type "apropos word" to search for commands related to "word". ---- Your version string may vary, of course. @@ -231,8 +235,7 @@ Your version string may vary, of course. The GNU Data Display Debugger is a good GUI frontend for GDB (and a lot of other command line debuggers), so you have to install GDB first. It is available for many UNIX-like -platforms and as the ddd package from the -<>. +platforms. If GNU DDD isn't already installed or available as a package for your platform, you can get it at: @@ -261,11 +264,12 @@ $ make --version should result in something like: ---- -GNU Make 3.81 -Copyright (C) 2006 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. -There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. +GNU Make 4.0 +Built for x86_64-pc-linux-gnu +Copyright (C) 1988-2013 Free Software Foundation, Inc. +Licence GPLv3+: GNU GPL version 3 or later +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. ---- Your version string may vary, of course. @@ -594,12 +598,19 @@ otherwise the debugger will simply fail or you will only see a lot of garbage. ===== Visual Studio integrated debugger You can use the integrated debugger of Visual Studio if your toolchain includes -it. However, setting up the environment is a bit tricky, as the Windows build -process uses makefiles instead of the .dsp/.dsw files usually used. +it. As described on http://msdn.microsoft.com/en-us/library/0bxe8ytt.aspx[MSDN], +create an EXE project for your built copy, +i.e. C:\Development\Wireshark\wireshark-qt-release\Wireshark.exe, and then +start the debugger in the mormal way. To set a breakpoint, open the required +source file using the File -> Open -> File menu and set the breakpoint as normal. -**** -This section not yet written -**** +The normal build is an optimised release version so debugging can be a bit +difficult as variables are optimised out into registers and the execution +order of statements can jump around. + +If you require a non-optimised version, then edit config.nmake and replace the /O2 +flag from LOCAL_CFLAGS with /Od, clean up the build (nmake -f Makefile.nmake clean) +and then rebuild. [[ChToolsMSDebuggingTools]] @@ -610,7 +621,8 @@ standalone GUI debugger. Although it's not that comfortable compared to debugging with the Visual Studio integrated debugger it can be helpful if you have to debug on a machine where an integrated debugger is not available. -You can get it free of charge from Microsoft in several ways, see the http://msdn.microsoft.com/en-us/library/windows/hardware/ff551063%28v=vs.85%29.aspx)[Debugging tools for Windows] page. +You can get it free of charge from Microsoft in several ways, see the +http://msdn.microsoft.com/en-us/library/windows/hardware/ff551063%28v=vs.85%29.aspx)[Debugging tools for Windows] page. You can also use Chocolatey to install WinDbg: @@ -618,6 +630,13 @@ You can also use Chocolatey to install WinDbg: PS:\> cinst windbg ---- +To debug Wireshark using WinDbg, open the built copy of Wireshark using +the File -> Open Executable... menu, +i.e. C:\Development\Wireshark\wireshark-qt-release\Wireshark.exe. To set a +breakpoint open the required source file using the File -> Open Source File... +menu and then click on the required line and press F9. To run the program, +press F5. + [[ChToolsBash]] === bash