Archive

Posts Tagged ‘Debug’

pragma warning

February 3rd, 2012 No comments

#pragma warning - enables selective modification of the behavior of compiler warning messages.

Additional “pragma warning” parameter is suppress – pushes the current state of the pragma on the stack, disables the specified warning for the next line, and then pops the warning stack so that the pragma state is reset.

Also __pragma() can be used instead of #pragma which allows it to use inside macros:

#define __const_cond( c ) \
 __pragma(warning(push)) \
 __pragma(warning(disable:4127)) \
 ( c ) \
 __pragma(warning(pop))

Windows Sysinternals and Sysinternals Live

February 2nd, 2012 No comments

The Sysinternals web site was created in 1996 by Mark Russinovich and Bryce Cogswell to host their advanced system utilities and technical information. Microsoft acquired Sysinternals in July, 2006. Whether you’re an IT Pro or a developer, you’ll find Sysinternals utilities to help you manage, troubleshoot and diagnose your Windows systems and applications. If you have a question about a tool or how to use them, please visit the Sysinternals Forum for answers and help from other users and our moderators.

Sysinternals Live is a service that enables you to execute Sysinternals tools directly from the Web without hunting for and manually downloading them. Simply enter a tool’s Sysinternals Live path into Windows Explorer or a command prompt as http://live.sysinternals.com/<toolname> or \\live.sysinternals.com\tools\<toolname>.

You can view the entire Sysinternals Live tools directory in a browser at live.sysinternals.com.

Or you can map the server to your drive:

net use y: \\live.sysinternals.com\tools

Software optimization resources

April 11th, 2010 No comments

Wireshark

January 16th, 2010 No comments

Wireshark is the world’s foremost network protocol analyzer, and is the de facto (and often de jure) standard across many industries and educational institutions.

Read more…

Windows XP Mode

December 1st, 2009 No comments

Windows XP Mode and Windows Virtual PC, available on Windows 7 Professional and Windows 7 Ultimate, allow you to run multiple Windows environments, such as Windows XP Mode, from your Windows 7 desktop.

Create a dmp file from the application

October 25th, 2009 No comments
static LPTOP_LEVEL_EXCEPTION_FILTER m_previousFilter = NULL;

typedef BOOL (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType,
                                         CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
                                         CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,
                                         CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam);

static LONG WINAPI MyUnhandledExceptionFilter(PEXCEPTION_POINTERS pExceptionInfo)
{
    HMODULE hDll = ::LoadLibrary(_T("DBGHELP.DLL"));
    MINIDUMPWRITEDUMP pDump = (MINIDUMPWRITEDUMP)::GetProcAddress(hDll, "MiniDumpWriteDump");

    _MINIDUMP_EXCEPTION_INFORMATION ExInfo;
    ExInfo.ThreadId = ::GetCurrentThreadId();
    ExInfo.ExceptionPointers = pExceptionInfo;
    ExInfo.ClientPointers = NULL;

    MINIDUMP_CALLBACK_INFORMATION mci;

    // HANDLE hFile - minidamp file name(for example, "test.dmp")

    BOOL bOK = pDump(::GetCurrentProcess(), ::GetCurrentProcessId(),
                     hFile, 1, &ExInfo, NULL, &mci);
}

void main()
{
    // setup our own ExceptionHandler
    m_previousFilter = SetUnhandledExceptionFilter(MyUnhandledExceptionFilter);

    // actial work

    // befoe exit
    if (m_previousFilter)
    {
        SetUnhandledExceptionFilter(m_previousFilter);
    }
}

Microsoft Application Verifier

September 29th, 2009 No comments

Application Verifier is designed specifically to detect and help debug memory corruptions and critical security vulnerabilities.

This is achieved by monitoring a native application’s interaction with the Windows operating system, profiling its use of objects, the registry, the file system, and Win32 APIs (including heaps, handles, locks, etc), and indicating issues when and where they are discovered.

Application Verifier also includes checks to predict how well an application may perform under various account privileges. These compatibility tests are used in Windows Logo program.

Print verification tests are also available to verify your usage of the print subsystem.

Download

Additional links:

VMMap

September 18th, 2009 No comments

VMMap is a process virtual and physical memory analysis utility. It shows a breakdown of a process’s committed virtual memory types as well as the amount of physical memory (working set) assigned by the operating system to those types. Besides graphical representations of memory usage, VMMap also shows summary information and a detailed process memory map. Powerful filtering and refresh capabilities allow you to identify the sources of process memory usage and the memory cost of application features.

Besides flexible views for analyzing live processes, VMMap supports the export of data in multiple forms, including a native format that preserves all the information so that you can load back in. It also includes command-line options that enable scripting scenarios.

VMMap is the ideal tool for developers wanting to understand and optimize their application’s memory resource usage.

Download VMMap

Run VMMap now from Live.Sysinternals.com

Development Environment

September 16th, 2009 Comments off

Development packages

Assembler

C/C++ language

UI Libraries

Web

  • XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use – just download, extract and start
  • SiteFusion is a server-based development environment. Applications are written in pure object-oriented PHP and work through a thin XUL client. SiteFusion applications look and behave like native system applications but run on a server generating JavaScript commands.
  • WebMatrix is a free web development tool from Microsoft that includes everything you need for website development. Start from open source web applications, built-in web templates or just start writing code yourself. It’s all-inclusive, simple and best of all free. Developing websites has never been easier.

Subversion

Git

File compirising

Testing

  • WinUnit
  • Microsoft Application Verifier
  • MiniFuzz – is a basic testing tool designed to help detect code flaws that may expose security vulnerabilities in file-handling code. This tool creates multiple random variations of file content and feeds it to the application to exercise the code in an attempt to expose unexpected and potentially insecure application behaviors.

Debugging

  • Visual Leak Detector for Visual C++ 2008/2010
  • The Debug Diagnostic Tool (DebugDiag) is designed to assist in troubleshooting issues such as hangs, slow performance, memory leaks or fragmentation, and crashes in any user-mode process. The tool includes additional debugging scripts focused on Internet Information Services (IIS) applications, web data access components, COM+ and related Microsoft technologies.
  • Debugging Tools for Windows (part of Windows Driver Kit (WDK))
  • VMMap
  • DebugView for Windows
  • !exploitable Crash Analyzer
  • Microsoft Application Verifier
  • SymStore – (symstore.exe) is a tool for creating symbol stores. It is included in the Debugging Tools for Windows package. SymStore stores symbols in a format that enables the debugger to look up the symbols based on the time stamp and size of the image (for a .dbg or executable file), or signature and age (for a .pdb file). The advantage of the symbol store over the traditional symbol storage format is that all symbols can be stored or referenced on the same server and retrieved by the debugger without any prior knowledge of which product contains the corresponding symbol.
  • gDEBugger CL it will bring gDEBugger’s advanced Debugging, Profiling and Memory Analysis abilities to the OpenCL developer’s world, helping OpenCL developers find bugs, optimize parallel computing application performance and memory consumption.
  • TraceTool 12.4 – the Swiss-Army Knife of Trace
  • APISpy32
  • FocusFlasher
  • WinSpy++
  • MiniSpy
  • API Monitor – is a software that monitors and displays API calls made by applications. Its a powerful tool for seeing how Windows and other applications work or tracking down problems that you have in your own applications. The current version include Filters to monitor the following API Categories.
  • Dependency Walker - is a free utility that scans any 32-bit or 64-bit Windows module (exe, dll, ocx, sys, etc.) and builds a hierarchical tree diagram of all dependent modules. For each module found, it lists all the functions that are exported by that module, and which of those functions are actually being called by other modules. Another view displays the minimum set of required files, along with detailed information about each file including a full path to the file, base address, version numbers, machine type, debug information, and more.
  • Network Sniffers

Tools

  • Edraw Max is an all-in-one graphics software that makes it simple to create professional-looking flowcharts, organizational charts, network diagrams, business presentations, building plans, mind maps, fashion designs, UML diagrams, workflows, program structures, web design diagrams, electrical engineering diagrams, directional maps, database diagrams and more.
  • WinMerge is an Open Source differencing and merging tool for Windows. WinMerge can compare both folders and files, presenting differences in a visual text format that is easy to understand and handle.

Tools – JSON

Tools – Development process

  • TestTrack Pro – Tracking defects, issues, and feature requests is a critical component of any software development and quality control process. The earlier and quicker bugs are resolved, the lower your development cost and the higher your product quality. TestTrack Pro puts improved quality, communication, and reporting within reach. Use TestTrack Pro and create better software in less time.
  • Perforce is a proven SCM solution for your valuable code and digital assets.
  • TaskJuggler is a modern and powerful, Free and Open Source Software project management tool. Its new approach to project planing and tracking is more flexible and superior to the commonly used Gantt chart editing tools. TaskJuggler is project management software for serious project managers. It covers the complete spectrum of project management tasks from the first idea to the completion of the project. It assists you during project scoping, resource assignment, cost and revenue planing, risk and communication management.
  • Agile Planner – this tool is for agile project teams, who currently are using sticky notes on the wall. With this tool stories, backlog and iterations are managed in a graphic designer, saved as files within visual studio projects and can be exported to images, reports and etc.

Tools – Build

  • Hudson – extensible continuous integration server

Tools – SQL

Tools – UML

  • PlantUML – is a component that allows to quickly write : sequence diagram, use case diagram, class diagram, activity diagram, component diagram, state diagram and object diagram.
  • UMLet - Free UML Tool for Fast UML Diagrams. UMLet is an open-source UML tool with a simple user interface: draw UML diagrams fast, export diagrams to eps, pdf, jpg, svg, and clipboard, share diagrams using Eclipse, and create new, custom UML elements.
  • StarUML is an open source project to develop fast, flexible, extensible, featureful, and freely-available UML/MDA platform running on Win32 platform. The goal of the StarUML project is to build a software modeling tool and also platform that is a compelling replacement of commercial UML tools such as Rational Rose, Together and so on.
  • ArgoUML – is the leading open source UML modeling tool and includes support for all standard UML 1.4 diagrams. It runs on any Java platform and is available in ten languages.
  • Violet UML Editor -  is a UML editor with these benefits: Very easy to learn and use. Draws nice-looking diagrams. Completely free. Cross-platform. Violet is intended for developers, students, teachers, and authors who need to produce simple UML diagrams quickly.
  • BOUML – is a free UML 2 tool box allowing you to specify and generate code in C++, Java, Idl, Php and Python.
  • UMLGraph – allows the declarative specification and drawing of UML class and sequence diagrams.
  • Dia – is a GTK+ based diagram creation program for GNU/Linux, Unix and Windows released under the GPL license.
  • WebSequenceDiagrams -

Utilities - Windows Sysinternals

  • Process Explorer
  • Autoruns for Windows
  • Handle - is a utility that displays information about open handles for any process in the system.
  • ListDLLs - is able to show you the full path names of loaded modules – not just their base names.
  • VMMap - VMMap is a process virtual and physical memory analysis utility.
  • DebugView for Windows - is an application that lets you monitor debug output on your local system, or any computer on the network that you can reach via TCP/IP.

Utilities

OS

Tags: , , ,

Fiddler

September 16th, 2009 No comments

Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP(S) traffic, set breakpoints, and “fiddle” with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.

Fiddler is freeware and can debug traffic from virtually any application, including Internet Explorer, Mozilla Firefox, Opera, and thousands more.