how to view Visual Studio *.pdb?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sedefy
    New Member
    • Sep 2010
    • 16

    how to view Visual Studio *.pdb?

    hi all,
    i know that the file *.pdb for my project contains all information about global variables address.
    i wana to know and view those information for some purposes.
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    pdb file get created during compilation time. may I ask why you want to do that??

    Comment

    • sedefy
      New Member
      • Sep 2010
      • 16

      #3
      i need to know the relative addresses of my global variables,so that while my programm running i can change the value of those addresses and control the running of my programm.
      because my program is a beta for an embeded control software that will be loadded to the chip after completing the testing,so i need to extract all debugging information and i know that is stored in the pdb file by the visual studio,so i wana a viwer for this file?thanks

      Comment

      • johny10151981
        Top Contributor
        • Jan 2010
        • 1059

        #4
        It does not make sense..
        If you want to control your memory address then look for the relative way, the way you are looking for is not convenient.

        The address you want to change will be chosen in runtime. you have nothing to do with that.

        I dont know your embedded device or the operating system of that device, but If you want to set(Not change) a address as global address then you will have to do it programmaticall y. May be defining a pointer type variable and then set the address directly.

        But If you want to access memory address of other software then Follow the link you might find a way out.

        Comment

        • sedefy
          New Member
          • Sep 2010
          • 16

          #5
          ok i will tell you the whole story
          i want to make an operating system,dispatch er and application programmes,load ed into a microcontroller ,this micro controller will be conected to rs232,via this serial port i will send command,those commands can be handeled bymy RTOS,thos command will be in format
          set memory address to a certain valuethis memory address will be global variable
          that is all,so to set the global variable x,to control my program flow after running in the microprocessor, i need to know the absolute address of this variable to write directly to the memory
          any way
          anyone knows how to view this pdb file?

          Comment

          • johny10151981
            Top Contributor
            • Jan 2010
            • 1059

            #6
            Just let me know this..
            Are you sure that your visual studio is the right tools for your embedded device??

            What Micro-controller are you using?

            Comment

            • sedefy
              New Member
              • Sep 2010
              • 16

              #7
              ok how to know the realtive address for all my global variables
              whow to view the pdb file

              i know that the vs2010 is not suitable but i will use it because it is easy,at the end i will but my code in an emulator,then burn it to my controller,so simply plz stop asking more questions and just give answer,many thanks

              Comment

              • Banfa
                Recognized Expert Expert
                • Feb 2006
                • 9067

                #8
                You would do well to listen to johny10151981 since he is trying to understand your problem and find a workable solution in response to your somewhat strange question.

                All of his questions are relevant to the answer to your question and the reason he is asking them is because at first glance it appears there is no reason to do what you are asking.

                Knowing the relative memory address of a variable in a Windows process is pointless because on Windows that would be the address in the processes virtual memory space and you just don't have access to that.

                Knowing the address of a variable in the memory space of a microprocessor so that you can examine/make changes to it does make sense. However knowing how to decode a pdb file will get you no closer to be able to do this which is why johny10151981 is asking about the tools you are using. pdb files are Microsoft specific, as far as I am aware, decoding one will give you no information about how the memory of your micro-controller is laid out (and as I have already stated is fairly useless on Windows too).

                You need to get whatever tools you would use to compile your code for the micro-controller. What you are likely to find is that the linker for the micro-controller tool-set will have an option to output a MAP file. This may well contain the information you need since the map file tends to list the location of items in memory including functions/objects and memory.

                On most of the platforms I have used the map file is human readable (i.e. text)

                Comment

                • sedefy
                  New Member
                  • Sep 2010
                  • 16

                  #9
                  hi all
                  you Banfa and MrMrjohny101519 81 are absolutely right,i know that
                  i am now in the developing phase
                  i finished my dispatcher and know developing command interaction module
                  this module will interact with the running program in the micro controller and change some global variables,which will control the flow of programmes and dispatcher in the microcontroller
                  but befroe downloading my code to microcontroller i need to test my algorithm first
                  and i test it under windows without the microcontroller at all
                  so i need to view it just to use it in the testing phase
                  i am so appriciated to all of you,trying helping me.
                  also if you have any advice in my way of coding please tellme

                  Comment

                  • johny10151981
                    Top Contributor
                    • Jan 2010
                    • 1059

                    #10
                    For your testing help we need to know what micro-controller you are using. I worked with PIC series micro-controller. It provides a software not just to compile but also to develop.

                    One thing you must know, compiler vary from processor to processor.

                    If I give an example of x86 machine(compati ble) and another example from PIC16F84 Machine then you might understand.

                    Code:
                    //x86 machine add instruction 
                    //var a, var b, save in var c
                    mov ax, a
                    add ax, b
                    mov c, ax
                    // on the other hand pic series
                    movf a
                    addwf b,w //w is not operand here
                    movwf c
                    //pic
                    Now what is the different between two processor one processor can take two operand other is only one. x86 processor is 32 bit wide instrction set, pic is 14 bit instruction set.

                    moreover your mic-controller may not have enough memory to load program,

                    so you can use VS to get the intellisense support but for compiling and debugging you must have to use the proper tools

                    Comment

                    • sedefy
                      New Member
                      • Sep 2010
                      • 16

                      #11
                      thanks johny10151981
                      you know hit the target
                      up till now i didnt choose thr microcontroller and i dont know how to choose,what to do
                      i need a micro controller that support my programm by
                      have an EPROM not less than 1M
                      has a WDT
                      has an RS232
                      also i dont know how to start my first microcontroller steps what to what to buy,what compiler
                      could you give me your advise please

                      Comment

                      • johny10151981
                        Top Contributor
                        • Jan 2010
                        • 1059

                        #12
                        You need a micro-controller that support your purpose not your program.

                        you have a EPROM, WDT, RS232 and they are not the requirement of the project.
                        Create your purpose properly.

                        Now, If you ask what type of micro-controller you should use, in general it completely depends on your project. The thing is, I am familial with two micro-controller ATMEL and PIC. There is also other micro-controller. Even if you want you can develop your system using x86 processor.

                        as a matter of fact lots of issue is involved with choosing your right process,
                        such as several PIC micro-controller provide WDT, RS232, USB and so on, same thing is also available in ATMEL.

                        Lots of other issue also need to in consideration, like size of program

                        As Example pic16f84 has only 1024 words of program memory
                        68 bytes of Data RAM
                        I dont know how much data ram you need,
                        Also it has only 13 output port and its not typical computer port, its only output pic, that can used for both serial and parallel data I/O, so I simply cannot suggest you what micro-controller you should use. But If you want to learn micro-controller. this is not the right place. definitely the way you are doing is wrong.

                        Comment

                        Working...