FIXUPVAR and breakpoint in OAL RRS feed

  • Question

  • Hello,

    I have never used FIXUPVAR and now I want to test it. I have created a global variable inside init.c (in oallib) in this way :

    DWORD g_dwMyVariable;

    In config.bib (into MEMORY section) I have the following line :

    nk.exe:g_dwMyVariable  00000000 0x2   FIXUPVAR

    So I want that my variable is set to 0x2 value. Into OEMInit() I have the following line for debugging :

     OALMSG(TRUE, (L"+g_dwMyVariable=%d\r\n", g_dwMyVariable));

    But the output is the following :


    so FIXUPVAR doesn't work...why ?

    Another question...I have put a breakpoint into OEMInit() but it doesn't hit, Why ?

    Thanks, Paolo.

    Tuesday, March 22, 2011 7:34 AM


All replies

  • FIXUPVAR does not work for uninitialized global variables and non-constant global variables that have been initialized to 0


    In addition the syntax you're using works for CE 6.0 while in CE 5.0 you need:

    g_dwMyVariable  00000000 0x2   FIXUPVAR

    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom Check my blog:
    Tuesday, March 22, 2011 9:13 AM
  • oops there was another question: the bp is not hit because the debugger is initialized later in the boot process (iirc by the first scheduled thread)
    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom Check my blog:
    Tuesday, March 22, 2011 9:44 AM
  • if you have a hardware debugger and it is having the platform builder support, you can use that for debugging OEMinit() stubs.

    Say for example marvel extreme debugger will support this one.

    Tuesday, March 22, 2011 9:50 AM
  • Thank you very much, I haven't read the documentation well. Now it works fine.

    Regards, Paolo.

    Wednesday, March 23, 2011 7:16 AM
  • Excuse me, I have another question. Why is useful FIXUPVAR ? Can you give me any examples where it is used ?

    Thanks, Paolo.

    Wednesday, March 23, 2011 7:17 AM
  • FIXUPVAR is usefull if you want to build the source code once, and then change the value of a variable when ROMIMAGE runs.   I have yet to figure out a use for it though.
    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG

    Eurotech Inc.
    Wednesday, March 23, 2011 11:53 AM
  • I use it quite a bit when setting OAL Log zones...

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog:

    Microsoft Embedded Partner
    Consultancy, training and development services.
    Friday, March 25, 2011 7:21 AM