C/C++ Tools & Methodology demonstration He Zongjian School of Software Engineering Tongji University.

Slides:



Advertisements
Similar presentations
Advanced Troubleshooting with Debug Diagnostics on IIS 6
Advertisements

Creating a Dialog-Based Comet Windows Program Brian Levantine.
CS 450 MPX P ROJECT Introduction to Turbo C. W HY USE T URBO C? Many ANSI C compilers are available for free, however they lack certain features that.
Professional Toolkit V2.0 C:\Presentations - SmartCafe_Prof_V2.0 - bsc page 1 Professional Toolkit 2.0.
DEV-2: Getting Started with OpenEdge® Architect – Part I
DEV-13: You've Got a Problem, Here’s How to Find It
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
The Microsoft View: Module 1: Getting Started. Copyright Course 2559B, Introduction to Visual Basic®.NET Programming with Microsoft®.NET. Lecture 1 Microsoft.
Visual Studio 2008 and ASP.NET 3.5 Mike Ormond Developer & Platform Group Microsoft Ltd
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
OllyDbg Debuger.
DEV450 Visual Studio: Best Practices For Debugging Managed Applications Habib Heydarian Scott Nonnenberg Program Managers Microsoft Corporation.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Aptech Borivali(West) Hefin Dsouza. Agenda  What is.NET and What is Visual Studio? .NET Framework 3.5 Overview.  Visual Studio 2008 Enhancements. 
Future Directions for Leveraging Advanced XML Tools and Building Custom XML Solutions Denise Draper DAT321 Microsoft Corporation.
Object Oriented Software Development 1. Introduction to C# and Visual Studio.
Introduction Purpose Objectives Content Learning Time
MDK-ARM Microcontroller Development Kit MDK: Microcontroller Development Kit.
Creating and Running Your First C# Program Telerik Software Academy Telerik School Academy.
Overview of Microsoft.Net and Vb.Net ITSE 2349 Spring 2002 Material from Microsoft.Net an Overview for ACC faculty by Stuart Laughton and Introduction.
A First Program Using C#
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Computing IV Visual C Introduction with OpenCV Example Xinwen Fu.
Future Directions: Building Customizable Applications using.NET Eric Schnepp TLN205 Lead Program Manager Microsoft Corporation.
2. Introduction to the Visual Studio.NET IDE. Chapter Outline Overview of the Visual Studio.NET IDE Overview of the Visual Studio.NET IDE Menu Bar and.
Developing C/C++ applications with the Eclipse CDT David Gallardo.
Engineering Computing I Chapter 1 – Part A A Tutorial Introduction.
DEV339 Best Practices for Debugging Visual Studio.NET Applications Keith Pleas Architect, Guided Design
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
1 Debugging: Catching Bugs ( II ) Ying Wu Electrical Engineering & Computer Science Northwestern University EECS 230 Lectures.
DEV-05: Ratcheting up your OpenEdge™ Development Productivity Sunil S Belgaonkar Principal Software Engineer.
SQL Server Crash Dump Analysis A brief tour with WinDbg and other ugly tools Pablo Álvarez Doval Debugging & Optimization Team Lead
Programming with Visual Studio 2005.NET A short review of the process.
Debugging and Profiling With some help from Software Carpentry resources.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
Module 1: Getting Started. Introduction to.NET and the.NET Framework Exploring Visual Studio.NET Creating a Windows Application Project Overview Use Visual.
Programming with Visual Studio.NET A short review of the process.
Module 2: Using Microsoft Visual Studio.NET. Overview Overview of Visual Studio.NET Creating an ASP.NET Web Application Project.
CSE 332: C++ debugging Why Debug a Program? When your program crashes –Finding out where it crashed –Examining program memory at that point When a bug.
Debugging Xin Tong. GDB GNU Project debugger Allows you to see what is going on `inside' another program while it executes or crashed. (Faster than printing.
DEV303 ASP.NET: Leveraging Visual Studio.NET For Web Projects Tony Goodhew Product Manager Microsoft Corp.
1 Programming Environment and Tools VS.Net 2012 First project MSDN Library.
Taking Control of Visual Studio through Extensions and Extensibility Anthony Cangialosi Senior Program Manager Lead Microsoft Corporation DEV311.
Sung-Dong Kim Dept. of Computer Engineering, Hansung University Chapter 3 Programming Tools.
What's New in Visual Studio 2010 Debugging Brian Peek Senior Consultant, ASPSOFT, Inc. Microsoft MVP - C#
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
1/21/2018 6:52 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Chapter 2: The Visual Studio .NET Development Environment
DEV-25: You've Got a Problem, Here’s How to Find It
CE-105 Spring 2007 Engr. Faisal ur Rehman
SQL Server Data Tools for Visual Studio Part I: Core SQL Server Tools
Using Visual Studio with C#
HP C/C++ Remote developer plug-in for Eclipse
Module 1: Getting Started
Microsoft Connect /23/ :48 AM
Microsoft Build /24/2018 4:02 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Using Visual Studio and VS Code for Embedded C/C++ Development
Tooling and Diagnostics
Super Charge Your Debugging in Visual Studio
12/1/2018 9:33 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Microsoft Visual Studio
When your program crashes
1/14/2019 3:57 AM © 2004 Microsoft Corporation. All rights reserved.
5/6/2019 7:40 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS.
Introduction to Windbg
Introduction to Windbg – Part2 Symbols
Overview of System Development for Windows CE.NET
.Net for Test and Measurement
Hello World Program In Visual Studio and Debugging
Presentation transcript:

C/C++ Tools & Methodology demonstration He Zongjian School of Software Engineering Tongji University

Agenda  Project management in Visual Studio  Develop Resource lookup  Debugging with Visual Studio  Introduction to Windows GUI Apps  Sample application of C++ project  References  Discussion

Project management in Visual Studio

Common Bad Habit  Create a *.c / *.cpp file  Open it with Visual Studio  Compile

Bad Effect  NO Intelligent Sense  Class View / File View disabled  Can NOT debugging  Can NOT locate definitions An Expensive Notepad

What is Workspace & Project  Configuration files that help us managing the project  A workspace can have multiple project  Workspaces have the.dsw extension  Projects have the.dsp extension  Double click the workspace can auto launch the Developer studio

Other files used by devenv .ncb : Visual C++ IntelliSense Database .rc : Resource template .pch : Precompiled header .obj : Intermediate file .pdb : Program debugging database .bsc : Browse information .clw : Class wizard file (MFC only)

Using File View & Class View  File View : –Add new file –Delete file  Class View : –Locate functions & variables –Add new class –Add member functions and member variables

Project configuration  Debug version VS Release Version  Enable RTTI  Command line arguments

Useful Tips  Code auto formatting (Alt + F8)  Go to definition  Go to reference  Find in files  Open document

New features in VS.NET .dsw ->.sln  Integrated IDE  Measure up to C++ standard  ……

Develop Resource lookup

Microsoft Developer Network (MSDN)  All develop related resources  Online Version: – –Released every 4 months  Visual Studio 6.0 Version (.chm) –VB 6, VC 6, VFP 6, VJ 6, VID 6, Platform SDK  After Jan 2002, Visual Studio.NET Version –.NET framework

Demo : How to use MSDN

Other Resources  Knowledge Base –  TechNet –  Developer Works (IBM) –

Debugging with Visual Studio

What is debugging?  A process for identifying the root cause of a problem by tracing program execution flow and underneath memory status.  Beneficial after performing general troubleshooting steps.

Basic debugging knowledge  Symbols : The PDB files generated with your binaries by VS  Debugging tools –Visual Studio –Windbg / CDB ( For Windows ) –Debug ( For MS-DOS ) –Gdb ( For Linux / Unix / AIX )

Common Debug Scenario  Logic Error  Memory Leak  Access Violation (AV)

Basic Methodology  Set break point  Step into / Step over / Step out  Variables monitor (Local / Watch / Auto)  Call stack  Memory  Register  Disassembly

Demo : How to use Visual Studio.NET to debugging

Advanced Methodology  Conditional Breakpoint  Remote debugging (GDI / Kernel)  JIT debugging  Debugging running process  Debugging crash dump  Multithread debugging

Demo : Conditional Breakpoint Attach to a process

Solving Access Violation  Buffer Overflow / Underflow –Heap Corruption –Stack Corruption  Memory Access Denied –Raw Pointer –Double Free

The Hint  Debuggers are just tools  We must also : –Know the product –Know the languages and their implications (compiler implementation) –Know the operating system –Know the CPU –Know the tools

Introduction to Windows GUI Applications

What does GUI App Contains  Entry Point : WinMain  Register a window class  Create and Show a Window  Message Loops  Windows Procedure (WinProc)  Resource Template

Demo : Create and analyze a GUI application

Sample application of C++ project

Demo : Text Miner 1.0 Cheat Killer 0.02 Demo : Text Miner 1.0 Cheat Killer 0.02

References

C / C++ references  Thinking in C++ 2nd Edition Bruce Eckel  C++ Primer Stanley B.Lippman  The C++ Programming Language 3rd Edition Bjarne Stroustrup

C / C++ references (Cont’d)  The C++ Standard Library 侯捷 译  STL 源代码剖析 侯捷 著  The C++ template David Vandevoorde  Inside C++ Object Model Stanley B.Lippman

GUI Programming  Programming Windows 4 th Edition Charles Petzold  MFC Windows 程序设计 2 nd Edition Jeff Prosise  Programming Microsoft Visual C++ David J. Kruglinski

Debugging References  Debugging Application John Robbins  Debugging Applications for Microsoft.NET and Microsoft Windows John Robbins  Debugging Windows Programs Everett N. McKay

Discussion

© 2003 Tongji University. All rights reserved. This presentation is for informational purposes only. TJSSE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY. Thanks! Question?