+ Reply to Thread
Results 1 to 2 of 2

Thread: What are PDBs?

  1. #1
    Senior Member LALIT KUMAR's Avatar
    Join Date
    Oct 2006
    Location
    new delhi
    Posts
    165
    Rep Power
    9

    What are PDBs?

    1. What are PDBs? Where must they be located for debugging to work?
    2. What is cyclomatic complexity and why is it important?
    3. Write a standard lock() plus double check to create a critical section around a variable access.
    4. What is FullTrust? Do GAC’ed assemblies have FullTrust?


  2. #2
    Moderator kiran2710's Avatar
    Join Date
    Jul 2006
    Posts
    2,157
    Rep Power
    81

    Re: What are PDBs?

    1.What are PDBs? Where must they be located for debugging to work?

    A : - A program database (PDB) files holds debugging and project state information that allows incremental linking of debug configuration of your program.There are several different types of symbolic debugging information. The default type for Microsoft compiler is the so-called PDB file. The compiler setting for creating this file is /Zi, or /ZI for C/C++(which creates a PDB file with additional information that enables a feature called “”Edit and Continue”") or a Visual Basic/C#/JScript .NET program with /debug.
    A PDB file is a separate file, placed by default in the Debug project subdirectory, that has the same name as the executable file with the extension .pdb. Note that the Visual C++ compiler by default creates an additional PDB file called VC60.pdb for VisulaC++6.0 and VC70.PDB file for VisulaC++7.0. The compiler creates this file during compilation of the source code, when the compiler isn’t aware of the final name of the executable. The linker can merge this temporary PDB file into the main one if you tell it to, but it won’t do it by default. The PDB file can be useful to display the detailed stack trace with source files and line numbers.

    2. What is cyclomatic complexity and why is it important?

    A :-- http://hissa.nist.gov/HHRFdata/Artif...5/chapter2.htm

    3. Write a standard lock() plus double check to create a critical section around a variable access.

    A :--
    — bool notLocked = true;
    — if (notLocked)
    — {
    — — lock (typeof(lockingObject))
    — — {
    — — — if (notLocked)
    — — — {
    — — — — notLocked = false;
    — — — — foo = lockingObject;
    — — — — notLocked = true;
    — — — }
    — — }
    — }


    or


    class Singleton
    {
    public static Singleton GetInstance()
    {
    if (_Instance == null)
    {
    lock(_Instance)
    {
    if (_Instance == null)
    {
    _Instance = new Singleton();
    }
    }
    }
    return _Instance;
    }
    private static volatile Singleton _Instance = null;
    protected Singleton(){}


    }
    4.What is FullTrust? Do GAC’ed assemblies have FullTrust?



    A:--

    Before the .NET Framework existed, Windows had two levels of trust for downloaded code. This old model was a binary trust model. You only had two choices: Full Trust, and No Trust. The code could either do anything you could do, or it wouldn’t run at all.
    The permission sets in .NET include FullTrust, SkipVerification, Execution, Nothing, LocalIntranet, Internet and Everything. Full Trust Grants unrestricted permissions to system resources. Fully trusted code run by a normal, nonprivileged user cannot do administrative tasks, but can access any resources the user can access, and do anything the user can do. From a security standpoint, you can think of fully trusted code as being similar to native, unmanaged code, like a traditional ActiveX control.
    GAC assemblies are granted FullTrust. In v1.0 and 1.1, the fact that assemblies in the GAC seem to always get a FullTrust grant is actually a side effect of the fact that the GAC lives on the local machine. If anyone were to lock down the security policy by changing the grant set of the local machine to something less than FullTrust, and if your assembly did not get extra permission from some other code group, it would no longer have FullTrust even though it lives in the GAC.




    FullTrust is a named permission set. FullTrust means executing code has full access to all resources


    FullTrust means all .NET security permissions are granted to the assembly. GAC assemblies have FullTrust by default, but that can be changed by the user’s security policy.



    Kiran








+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Content Relevant URLs by vBSEO 3.5.1 PL1