Thomas Faber | 2 Oct 09:34 2014

Re: [ros-diffs] [tkreuzer] 64449: [DLLEXPORT_TEST] Fix a typo

On 2014-10-02 09:30, tkreuzer@... wrote:
> -add_executable(dllimport_test
> +add_library(dllimport_test
>      dllimport_framedyn.cpp)

Isn't the point of this test to check for linker errors?
Timo Kreuzer | 1 Oct 21:11 2014
Picon

Re: [ros-diffs] [jgardou] 64396: [NTOS/CM] - Add NtQueryKey(KeyNameInformation) implementation. CORE-8581 #resolve


A few remarks:
- There should be only one SEH, not for performance, but since the
KeyNameInfo->NameLength = 0; needs to be in SEH as well
- The function duplicates a lot of code from CmpConstructName, possibly
even incomplete
- There was already an implementation in the kernel-fun branch

Unrelated to your code, just something I spotted in that file:
- CmpQueryKeyData cannot be wrapped in SEH (it would cause reference
leaks on exception), but is wrapped in SEH in CmEnumerateKey
- CmpQueryKeyData does not use SEH, but is called with user mode
pointers from CmQueryKey

Timo

Am 29.09.2014 18:27, schrieb jgardou@...:
> Author: jgardou
> Date: Mon Sep 29 16:27:16 2014
> New Revision: 64396
>
> URL: http://svn.reactos.org/svn/reactos?rev=64396&view=rev
> Log:
> [NTOS/CM]
>  - Add NtQueryKey(KeyNameInformation) implementation.
> CORE-8581 #resolve
>
>
Timo Kreuzer | 29 Sep 19:06 2014
Picon

Re: [ros-diffs] [jgardou] 64392: [NDK] - Fix KEY_NAME_INFORMATION structure


Wow, ...
IMO we should autogenerate a header for usermode stuff from XDK, instead
of using NDK.

Am 29.09.2014 15:32, schrieb jgardou@...:
> Author: jgardou
> Date: Mon Sep 29 13:32:44 2014
> New Revision: 64392
>
> URL: http://svn.reactos.org/svn/reactos?rev=64392&view=rev
> Log:
> [NDK]
>  - Fix KEY_NAME_INFORMATION structure
>
> Modified:
>     trunk/reactos/include/ndk/cmtypes.h
>
> Modified: trunk/reactos/include/ndk/cmtypes.h
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/cmtypes.h?rev=64392&r1=64391&r2=64392&view=diff
> ==============================================================================
> --- trunk/reactos/include/ndk/cmtypes.h	[iso-8859-1] (original)
> +++ trunk/reactos/include/ndk/cmtypes.h	[iso-8859-1] Mon Sep 29 13:32:44 2014
>  <at>  <at>  -296,6 +296,7  <at>  <at> 
>  
>  typedef struct _KEY_NAME_INFORMATION
>  {
> +    ULONG NameLength;
>      WCHAR Name[1];
>  } KEY_NAME_INFORMATION, *PKEY_NAME_INFORMATION;
(Continue reading)

Alexander Rechitskiy | 29 Sep 11:06 2014
Picon

EPIC: ReactOS <at> Samsung Galaxy S III mini

http://vk.com/reactos_ru?w=wall-1086956_12642
ReactOS runs on Samsung Galaxy S III mini
--
Best regards,
Alexander Rechitskiy
_______________________________________________
Ros-dev mailing list
Ros-dev@...
http://www.reactos.org/mailman/listinfo/ros-dev
Jérôme Gardou | 26 Sep 14:52 2014

Re: [ros-diffs] [jgardou] 64311: [WIN32K] - Simplify IntRemoveWindowProp - Complain loudly if a NULL list entry sneaks into a window property list. CORE-8562

Uh oh, seems like I screwed up these two.

The spec2def part of this commit should indeed belong to r64312.

Le 26/09/2014 14:43, jgardou <at> svn.reactos.org a écrit :
> Author: jgardou
> Date: Fri Sep 26 12:43:12 2014
> New Revision: 64311
>
> URL: http://svn.reactos.org/svn/reactos?rev=64311&view=rev
> Log:
> [WIN32K]
>   - Simplify IntRemoveWindowProp
>   - Complain loudly if a NULL list entry sneaks into a window property list.
> CORE-8562
>
> Modified:
>      trunk/reactos/tools/spec2def/spec2def.c
>      trunk/reactos/win32ss/user/ntuser/prop.c
>
> Modified: trunk/reactos/tools/spec2def/spec2def.c
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/spec2def/spec2def.c?rev=64311&r1=64310&r2=64311&view=diff
> ==============================================================================
> --- trunk/reactos/tools/spec2def/spec2def.c	[iso-8859-1] (original)
> +++ trunk/reactos/tools/spec2def/spec2def.c	[iso-8859-1] Fri Sep 26 12:43:12 2014
>  <at>  <at>  -38,6 +38,7  <at>  <at> 
>   typedef int (*PFNOUTLINE)(FILE *, EXPORT *);
>   int gbMSComp = 0;
>   int gbImportLib = 0;
> +int gbTracing = 0;
>   int giArch = ARCH_X86;
>   char *pszArchString = "i386";
>   char *pszArchString2;
>  <at>  <at>  -52,6 +53,9  <at>  <at> 
>       FL_STUB = 2,
>       FL_NONAME = 4,
>       FL_ORDINAL = 8,
> +    FL_NORELAY = 16,
> +    FL_RET64 = 32,
> +    FL_REGISTER = 64,
>   };
>
>   enum
>  <at>  <at>  -161,52 +165,126  <at>  <at> 
>   OutputHeader_stub(FILE *file)
>   {
>       fprintf(file, "/* This file is autogenerated, do not edit. */\n\n"
> -            "#include <stubs.h>\n\n");
> +            "#include <stubs.h>\n");
> +
> +    if (gbTracing)
> +    {
> +        fprintf(file, "#include <wine/debug.h>\n");
> +        fprintf(file, "#include <inttypes.h>\n");
> +        fprintf(file, "WINE_DECLARE_DEBUG_CHANNEL(relay);\n");
> +    }
> +
> +    fprintf(file, "\n");
>   }
>
>   int
>   OutputLine_stub(FILE *file, EXPORT *pexp)
>   {
>       int i;
> +    int bRelay = 0;
> +    int bInPrototype;
>
>       if (pexp->nCallingConvention != CC_STUB &&
> -        (pexp->uFlags & FL_STUB) == 0) return 0;
> -
> -    fprintf(file, "int ");
> -    if ((giArch == ARCH_X86) &&
> -        pexp->nCallingConvention == CC_STDCALL)
> -    {
> -        fprintf(file, "__stdcall ");
> -    }
> -
> -    /* Check for C++ */
> -    if (pexp->strName.buf[0] == '?')
> -    {
> -        fprintf(file, "stub_function%d(", pexp->nNumber);
> +        (pexp->uFlags & FL_STUB) == 0)
> +    {
> +        /* Only relay trace stdcall C functions */
> +        if (!gbTracing || (pexp->nCallingConvention != CC_STDCALL)
> +                || (pexp->uFlags & FL_NORELAY)
> +                || (pexp->strName.buf[0] == '?'))
> +        {
> +            return 0;
> +        }
> +        bRelay = 1;
> +    }
> +
> +    /* Declare the "real" function */
> +    if (bRelay)
> +    {
> +        fprintf(file, "extern ");
> +        bInPrototype = 1;
> +    }
> +
> +    do
> +    {
> +        if (pexp->uFlags & FL_REGISTER)
> +        {
> +            /* FIXME: Not sure this is right */
> +            fprintf(file, "void ");
> +        }
> +        else if (pexp->uFlags & FL_RET64)
> +        {
> +            fprintf(file, "__int64 ");
> +        }
> +        else
> +        {
> +            fprintf(file, "int ");
> +        }
> +
> +        if ((giArch == ARCH_X86) &&
> +            pexp->nCallingConvention == CC_STDCALL)
> +        {
> +            fprintf(file, "__stdcall ");
> +        }
> +
> +        /* Check for C++ */
> +        if (pexp->strName.buf[0] == '?')
> +        {
> +            fprintf(file, "stub_function%d(", pexp->nNumber);
> +        }
> +        else
> +        {
> +            if (!bRelay || bInPrototype)
> +                fprintf(file, "%.*s(", pexp->strName.len, pexp->strName.buf);
> +            else
> +                fprintf(file, "$relaytrace$%.*s(", pexp->strName.len, pexp->strName.buf);
> +        }
> +
> +        for (i = 0; i < pexp->nArgCount; i++)
> +        {
> +            if (i != 0) fprintf(file, ", ");
> +            switch (pexp->anArgs[i])
> +            {
> +                case ARG_LONG: fprintf(file, "long"); break;
> +                case ARG_PTR:  fprintf(file, "void*"); break;
> +                case ARG_STR:  fprintf(file, "char*"); break;
> +                case ARG_WSTR: fprintf(file, "wchar_t*"); break;
> +                case ARG_DBL:  fprintf(file, "double"); break;
> +                case ARG_INT64 :  fprintf(file, "__int64"); break;
> +                case ARG_INT128 :  fprintf(file, "__int128"); break;
> +                case ARG_FLOAT: fprintf(file, "float"); break;
> +            }
> +            fprintf(file, " a%d", i);
> +        }
> +
> +        if (bInPrototype)
> +        {
> +            fprintf(file, ");\n\n");
> +        }
> +    } while (bInPrototype--);
> +
> +    if (!bRelay)
> +    {
> +        fprintf(file, ")\n{\n\tDbgPrint(\"WARNING: calling stub %.*s(",
> +                pexp->strName.len, pexp->strName.buf);
>       }
>       else
>       {
> -        fprintf(file, "%.*s(", pexp->strName.len, pexp->strName.buf);
> -    }
> -
> -    for (i = 0; i < pexp->nArgCount; i++)
> -    {
> -        if (i != 0) fprintf(file, ", ");
> -        switch (pexp->anArgs[i])
> -        {
> -            case ARG_LONG: fprintf(file, "long"); break;
> -            case ARG_PTR:  fprintf(file, "void*"); break;
> -            case ARG_STR:  fprintf(file, "char*"); break;
> -            case ARG_WSTR: fprintf(file, "wchar_t*"); break;
> -            case ARG_DBL:
> -            case ARG_INT64 :  fprintf(file, "__int64"); break;
> -            case ARG_INT128 :  fprintf(file, "__int128"); break;
> -            case ARG_FLOAT: fprintf(file, "float"); break;
> -        }
> -        fprintf(file, " a%d", i);
> -    }
> -    fprintf(file, ")\n{\n\tDbgPrint(\"WARNING: calling stub %.*s(",
> -            pexp->strName.len, pexp->strName.buf);
> +        fprintf(file, ")\n{\n");
> +        if (pexp->uFlags & FL_REGISTER)
> +        {
> +            /* No return value */
> +        }
> +        else if (pexp->uFlags & FL_RET64)
> +        {
> +            fprintf(file, "\t__int64 retval;\n");
> +        }
> +        else
> +        {
> +            fprintf(file, "\tint retval;\n");
> +        }
> +        fprintf(file, "\tif(TRACE_ON(relay))\n\t\tDPRINTF(\"%s: %.*s(",
> +                        pszDllName, pexp->strName.len, pexp->strName.buf);
> +    }
>
>       for (i = 0; i < pexp->nArgCount; i++)
>       {
>  <at>  <at>  -246,8 +324,42  <at>  <at> 
>       {
>           fprintf(file, "\t__wine_spec_unimplemented_stub(\"%s\", __FUNCTION__);\n", pszDllName);
>       }
> -
> -    fprintf(file, "\treturn 0;\n}\n\n");
> +    else if (bRelay)
> +    {
> +        if (pexp->uFlags & FL_REGISTER)
> +        {
> +            fprintf(file,"\t");
> +        }
> +        else
> +        {
> +            fprintf(file, "\tretval = ");
> +        }
> +        fprintf(file, "%.*s(", pexp->strName.len, pexp->strName.buf);
> +
> +        for (i = 0; i < pexp->nArgCount; i++)
> +        {
> +            if (i != 0) fprintf(file, ", ");
> +            fprintf(file, "a%d", i);
> +        }
> +        fprintf(file, ");\n");
> +    }
> +
> +    if (!bRelay)
> +        fprintf(file, "\treturn 0;\n}\n\n");
> +    else if ((pexp->uFlags & FL_REGISTER) == 0)
> +    {
> +        if (pexp->uFlags & FL_RET64)
> +        {
> +            fprintf(file, "\tif(TRACE_ON(relay))\n\t\t(\"%s: %.*s: retval = %%\"PRIx64\"\\n\", retval);\n",
> +                pszDllName, pexp->strName.len, pexp->strName.buf);
> +        }
> +        else
> +        {
> +            fprintf(file, "\tTRACE_(relay)(\"%.*s: retval = 0x%%lx\\n\", retval);\n",
> +                pexp->strName.len, pexp->strName.buf);
> +        }
> +        fprintf(file, "\treturn retval;\n}\n\n");
> +    }
>
>       return 1;
>   }
>  <at>  <at>  -458,11 +570,18  <at>  <at> 
>           /* C++ stubs are forwarded to C stubs */
>           fprintf(fileDest, "=stub_function%d", pexp->nNumber);
>       }
> +    else if (gbTracing && ((pexp->uFlags & FL_NORELAY) == 0) && (pexp->nCallingConvention == CC_STDCALL) &&
> +            (pexp->strName.buf[0] != '?'))
> +    {
> +        /* Redirect it to the relay-tracing trampoline */
> +        fprintf(fileDest, "=$relaytrace$%.*s", pexp->strName.len, pexp->strName.buf);
> +    }
>   }
>
>   void
>   OutputLine_def_GCC(FILE *fileDest, EXPORT *pexp)
>   {
> +    int bTracing = 0;
>       /* Print the function name, with decoration for export libs */
>       PrintName(fileDest, pexp, &pexp->strName, gbImportLib);
>       DbgPrint("Generating def line for '%.*s'\n", pexp->strName.len, pexp->strName.buf);
>  <at>  <at>  -482,6 +601,19  <at>  <at> 
>       {
>           /* C++ stubs are forwarded to C stubs */
>           fprintf(fileDest, "=stub_function%d", pexp->nNumber);
> +    }
> +    else if (gbTracing && ((pexp->uFlags & FL_NORELAY) == 0) && (pexp->nCallingConvention == CC_STDCALL) &&
> +            (pexp->strName.buf[0] != '?'))
> +    {
> +        /* Redirect it to the relay-tracing trampoline */
> +        char buf[256];
> +        STRING strTarget;
> +        fprintf(fileDest, "=");
> +        sprintf(buf, "$relaytrace$%.*s", pexp->strName.len, pexp->strName.buf);
> +        strTarget.buf = buf;
> +        strTarget.len = pexp->strName.len + 12;
> +        PrintName(fileDest, pexp, &strTarget, 1);
> +        bTracing = 1;
>       }
>
>       /* Special handling for stdcall and fastcall */
>  <at>  <at>  -500,7 +632,7  <at>  <at> 
>                   fprintf(fileDest, "==%.*s", pexp->strName.len, pexp->strName.buf);
>               }
>           }
> -        else if (!pexp->strTarget.buf)
> +        else if ((!pexp->strTarget.buf) && !(bTracing))
>           {
>               /* Write a forwarder to the actual decorated symbol */
>               fprintf(fileDest, "=");
>  <at>  <at>  -694,11 +826,17  <at>  <at> 
>               {
>                   exp.uFlags |= FL_STUB;
>               }
> -            else if (CompareToken(pc, "-norelay") ||
> -                     CompareToken(pc, "-register") ||
> -                     CompareToken(pc, "-ret64"))
> -            {
> -                /* silently ignore these */
> +            else if (CompareToken(pc, "-norelay"))
> +            {
> +                exp.uFlags |= FL_NORELAY;
> +            }
> +            else if (CompareToken(pc, "-ret64"))
> +            {
> +                exp.uFlags |= FL_RET64;
> +            }
> +            else if (CompareToken(pc, "-register"))
> +            {
> +                exp.uFlags |= FL_REGISTER;
>               }
>               else
>               {
>  <at>  <at>  -862,6 +1000,9  <at>  <at> 
>                    fprintf(stderr, "error: line %d, additional tokens after ')'\n", nLine);
>                    return -17;
>               }
> +
> +            /* Don't relay-trace forwarded functions */
> +            exp.uFlags |= FL_NORELAY;
>           }
>           else
>           {
>  <at>  <at>  -886,16 +1027,17  <at>  <at> 
>
>   void usage(void)
>   {
> -    printf("syntax: spec2pdef [<options> ...] <spec file>\n"
> +    printf("syntax: spec2def [<options> ...] <spec file>\n"
>              "Possible options:\n"
> -           "  -h --help   prints this screen\n"
> -           "  -l=<file>   generates an asm lib stub\n"
> -           "  -d=<file>   generates a def file\n"
> -           "  -s=<file>   generates a stub file\n"
> -           "  --ms        msvc compatibility\n"
> -           "  -n=<name>   name of the dll\n"
> -           "  --implib    generate a def file for an import library\n"
> -           "  -a=<arch>   Set architecture to <arch>. (i386, x86_64, arm)\n");
> +           "  -h --help       prints this screen\n"
> +           "  -l=<file>       generates an asm lib stub\n"
> +           "  -d=<file>       generates a def file\n"
> +           "  -s=<file>       generates a stub file\n"
> +           "  --ms            msvc compatibility\n"
> +           "  -n=<name>       name of the dll\n"
> +           "  --implib        generate a def file for an import library\n"
> +           "  -a=<arch>       Set architecture to <arch>. (i386, x86_64, arm)\n"
> +           "  --with-tracing generates wine-like \"+relay\" trace trampolines. (necessitates -s)\n");
>   }
>
>   int main(int argc, char *argv[])
>  <at>  <at>  -945,6 +1087,15  <at>  <at> 
>           {
>               gbMSComp = 1;
>           }
> +        else if ((strcasecmp(argv[i], "--with-tracing") == 0))
> +        {
> +            if (!pszStubFileName)
> +            {
> +                fprintf(stderr, "Error: cannot use --with-tracing without -s option.\n");
> +                return -1;
> +            }
> +            gbTracing = 1;
> +        }
>           else if (argv[i][1] == 'a' && argv[i][2] == '=')
>           {
>               pszArchString = argv[i] + 3;
>
> Modified: trunk/reactos/win32ss/user/ntuser/prop.c
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/prop.c?rev=64311&r1=64310&r2=64311&view=diff
> ==============================================================================
> --- trunk/reactos/win32ss/user/ntuser/prop.c	[iso-8859-1] (original)
> +++ trunk/reactos/win32ss/user/ntuser/prop.c	[iso-8859-1] Fri Sep 26 12:43:12 2014
>  <at>  <at>  -19,9 +19,18  <at>  <at> 
>      int i;
>
>      ListEntry = Window->PropListHead.Flink;
> +
>      for (i = 0; i < Window->PropListItems; i++ )
>      {
>         Property = CONTAINING_RECORD(ListEntry, PROPERTY, PropListEntry);
> +
> +      if (ListEntry == NULL)
> +      {
> +          ERR("Corrupted (or uninitialized?) property list for window %p. Prop count %d. Atom %d.\n",
> +              Window, Window->PropListItems, Atom);
> +          return NULL;
> +      }
> +
>         if (Property->Atom == Atom)
>         {
>            return(Property);
>  <at>  <at>  -84,16 +93,14  <at>  <at> 
>   {
>      PLIST_ENTRY ListEntry;
>      PPROPERTY Property;
> -   int i, Count = Window->PropListItems;
> -
> -   ListEntry = Window->PropListHead.Flink;
> -   for (i = 0; i < Count; i++ )
> -   {
> -      Property = CONTAINING_RECORD(ListEntry, PROPERTY, PropListEntry);
> -      ListEntry = ListEntry->Flink;
> -      RemoveEntryList(&Property->PropListEntry);
> -      UserHeapFree(Property);
> -      Window->PropListItems--;
> +
> +   while (!IsListEmpty(&Window->PropListHead))
> +   {
> +       ListEntry = Window->PropListHead.Flink;
> +       Property = CONTAINING_RECORD(ListEntry, PROPERTY, PropListEntry);
> +       RemoveEntryList(&Property->PropListEntry);
> +       UserHeapFree(Property);
> +       Window->PropListItems--;
>      }
>      return;
>   }
>
>

_______________________________________________
Ros-dev mailing list
Ros-dev <at> reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev
Colin Finck | 23 Sep 22:16 2014

Video of our ReactOS presentation online

Hi all,

As the question usually arises: The video of Daniel's and my ReactOS presentation at Kieler Linux Tage is online: http://youtu.be/oQsKzW_Rx3k

Do whatever you want with it ;)
This is probably the first ever ReactOS presentation held using ReactOS itself! And it worked like a charm!

We also met an author of German news site heise.de there, who wants to publish an article about the current state ReactOS soon.

Cheers,

Colin

_______________________________________________
Ros-dev mailing list
Ros-dev@...
http://www.reactos.org/mailman/listinfo/ros-dev
Aleksey Bragin | 23 Sep 22:11 2014

Status Meeting (September 2014)

Hello,
Let me invite you to the monthly status meeting taking place 25th of 
September, 19:00 UTC. If there are any proposals regarding moving the 
meeting date/time - please send them today.

IRC service will only be started shortly before the meeting. Your 
participation passwords and server address will be emailed to you 
shortly before the meeting starts, and they are going to be different 
once again as they are not stored in any database. Hopefully it's not 
much of inconvenience.
If someone still is not getting passwords sent before a meeting - please 
email Pierre before the meeting started to get one.

Please send agenda proposals to me before the meeting, so that we can 
start with a proposed agenda.

Proposed agenda points so far:

- Agile missing in Jira (looks like an incompatible version)
- new on-demand builders (Clang, VC, x64, arm, branch, patch)
- testbot on a win 2003 machine

Let me know if any of those is already resolved. Thanks!

Regards,
Aleksey Bragin
Timo Kreuzer | 17 Sep 21:32 2014
Picon

Re: [ros-diffs] [jgardou] 64176: [GDI32] - Fix up values got from win32k in GetOutlineTextMetrics and do not fail if the provided buffersize is only sizeof(OUTLINETEXTMETRICW). CORE-8507 #resolve

Am 17.09.2014 11:54, schrieb jgardou@...:
> Author: jgardou
> Date: Wed Sep 17 09:54:14 2014
> New Revision: 64176
>
> URL: http://svn.reactos.org/svn/reactos?rev=64176&view=rev
> Log:
> [GDI32]
>  - Fix up values got from win32k in GetOutlineTextMetrics and do not fail if the provided buffersize is only sizeof(OUTLINETEXTMETRICW).
> CORE-8507 #resolve
>
> Modified:
>     trunk/reactos/win32ss/gdi/gdi32/objects/font.c
>
> Modified: trunk/reactos/win32ss/gdi/gdi32/objects/font.c
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/objects/font.c?rev=64176&r1=64175&r2=64176&view=diff
> ==============================================================================
> --- trunk/reactos/win32ss/gdi/gdi32/objects/font.c	[iso-8859-1] (original)
> +++ trunk/reactos/win32ss/gdi/gdi32/objects/font.c	[iso-8859-1] Wed Sep 17 09:54:14 2014
>  <at>  <at>  -9,8 +9,19  <at>  <at> 
>  
>  #include <precomp.h>
>  
> +#include <math.h>
> +
>  #define NDEBUG
>  #include <debug.h>
> +
> +/* Rounds a floating point number to integer. The world-to-viewport
> + * transformation process is done in floating point internally. This function
> + * is then used to round these coordinates to integer values.
> + */
> +static __inline INT GDI_ROUND(FLOAT val)
> +{
> +   return (int)floor(val + 0.5);
> +}
roundf() is the appropriate function here. The older MS crt headers
don't have the *round*() functions, but VS 2013 headers seem to have
them (according MSDN).
I propose adding them inside some #ifdef, instead of reimplementing them
in different places.

For the other functions: strange coding style. Is this taken from wine?
Timo Kreuzer | 15 Sep 21:43 2014
Picon

Topics for next meeting

Hi,

I'd like to propose some topics for the next meeting:

- Agile missing in Jira (looks like an incompatible version)
- new on-demand builders (Clang, VC, x64, arm, branch, patch)
- testbot on a win 2003 machine

Timo
Jérôme Gardou | 14 Sep 23:10 2014

Re: [ros-diffs] [akhaldi] 64151: [XDK][DDK] * Handle the rest of cases about the order of pragma and symbol declaration.

This breaks KDGDB compilation (and most probable KDCOM too if one would 
want to compile it using GCC)

drivers/base/kdgdb/gdb_send.c:77: référence indéfinie vers « 
__imp__KdDebuggerNotPresent »

Le 14/09/2014 17:49, akhaldi <at> svn.reactos.org a écrit :
> Author: akhaldi
> Date: Sun Sep 14 15:49:35 2014
> New Revision: 64151
>
> URL: http://svn.reactos.org/svn/reactos?rev=64151&view=rev
> Log:
> [XDK][DDK]
> * Handle the rest of cases about the order of pragma and symbol declaration.
>
> Modified:
>      trunk/reactos/include/ddk/ntddk.h
>      trunk/reactos/include/ddk/ntifs.h
>      trunk/reactos/include/ddk/wdm.h
>      trunk/reactos/include/xdk/fsrtlfuncs.h
>      trunk/reactos/include/xdk/haltypes.h
>      trunk/reactos/include/xdk/kdfuncs.h
>      trunk/reactos/include/xdk/ketypes.h
>      trunk/reactos/include/xdk/mmtypes.h
>      trunk/reactos/include/xdk/ntifs.template.h
>
> Modified: trunk/reactos/include/ddk/ntddk.h
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntddk.h?rev=64151&r1=64150&r2=64151&view=diff
> ==============================================================================
> --- trunk/reactos/include/ddk/ntddk.h	[iso-8859-1] (original)
> +++ trunk/reactos/include/ddk/ntddk.h	[iso-8859-1] Sun Sep 14 15:49:35 2014
>  <at>  <at>  -1670,8 +1670,8  <at>  <at> 
>   extern HAL_DISPATCH HalDispatchTable;
>   #define HALDISPATCH (&HalDispatchTable)
>   #else
> +__CREATE_NTOS_DATA_IMPORT_ALIAS(HalDispatchTable)
>   extern PHAL_DISPATCH HalDispatchTable;
> -__CREATE_NTOS_DATA_IMPORT_ALIAS(HalDispatchTable)
>   #define HALDISPATCH HalDispatchTable
>   #endif
>   
>
> Modified: trunk/reactos/include/ddk/ntifs.h
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=64151&r1=64150&r2=64151&view=diff
> ==============================================================================
> --- trunk/reactos/include/ddk/ntifs.h	[iso-8859-1] (original)
> +++ trunk/reactos/include/ddk/ntifs.h	[iso-8859-1] Sun Sep 14 15:49:35 2014
>  <at>  <at>  -8396,8 +8396,8  <at>  <at> 
>   extern const UCHAR * const FsRtlLegalAnsiCharacterArray;
>   #define LEGAL_ANSI_CHARACTER_ARRAY FsRtlLegalAnsiCharacterArray
>   #else
> +__CREATE_NTOS_DATA_IMPORT_ALIAS(FsRtlLegalAnsiCharacterArray)
>   extern const UCHAR * const *FsRtlLegalAnsiCharacterArray;
> -__CREATE_NTOS_DATA_IMPORT_ALIAS(FsRtlLegalAnsiCharacterArray)
>   #define LEGAL_ANSI_CHARACTER_ARRAY (*FsRtlLegalAnsiCharacterArray)
>   #endif
>   
>  <at>  <at>  -10993,8 +10993,8  <at>  <at> 
>   extern PUSHORT NlsOemLeadByteInfo;
>   #define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
>   #else
> +__CREATE_NTOS_DATA_IMPORT_ALIAS(NlsOemLeadByteInfo)
>   extern PUSHORT *NlsOemLeadByteInfo;
> -__CREATE_NTOS_DATA_IMPORT_ALIAS(NlsOemLeadByteInfo)
>   #define NLS_OEM_LEAD_BYTE_INFO (*NlsOemLeadByteInfo)
>   #endif
>   
>
> Modified: trunk/reactos/include/ddk/wdm.h
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=64151&r1=64150&r2=64151&view=diff
> ==============================================================================
> --- trunk/reactos/include/ddk/wdm.h	[iso-8859-1] (original)
> +++ trunk/reactos/include/ddk/wdm.h	[iso-8859-1] Sun Sep 14 15:49:35 2014
>  <at>  <at>  -1661,8 +1661,8  <at>  <at> 
>   #elif (NTDDI_VERSION >= NTDDI_WINXP)
>   extern NTSYSAPI CCHAR KeNumberProcessors;
>   #else
> +__CREATE_NTOS_DATA_IMPORT_ALIAS(KeNumberProcessors)
>   extern PCCHAR KeNumberProcessors;
> -__CREATE_NTOS_DATA_IMPORT_ALIAS(KeNumberProcessors)
>   #endif
>   
>   
>  <at>  <at>  -1815,8 +1815,8  <at>  <at> 
>   } MM_SYSTEMSIZE;
>   
>   #ifndef _NTSYSTEM_
> +__CREATE_NTOS_DATA_IMPORT_ALIAS(Mm64BitPhysicalAddress)
>   extern PBOOLEAN Mm64BitPhysicalAddress;
> -__CREATE_NTOS_DATA_IMPORT_ALIAS(Mm64BitPhysicalAddress)
>   #endif
>   extern NTKERNELAPI PVOID MmBadPointer;
>   
>
> Modified: trunk/reactos/include/xdk/fsrtlfuncs.h
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/fsrtlfuncs.h?rev=64151&r1=64150&r2=64151&view=diff
> ==============================================================================
> --- trunk/reactos/include/xdk/fsrtlfuncs.h	[iso-8859-1] (original)
> +++ trunk/reactos/include/xdk/fsrtlfuncs.h	[iso-8859-1] Sun Sep 14 15:49:35 2014
>  <at>  <at>  -1584,8 +1584,8  <at>  <at> 
>   extern const UCHAR * const FsRtlLegalAnsiCharacterArray;
>   #define LEGAL_ANSI_CHARACTER_ARRAY FsRtlLegalAnsiCharacterArray
>   #else
> +__CREATE_NTOS_DATA_IMPORT_ALIAS(FsRtlLegalAnsiCharacterArray)
>   extern const UCHAR * const *FsRtlLegalAnsiCharacterArray;
> -__CREATE_NTOS_DATA_IMPORT_ALIAS(FsRtlLegalAnsiCharacterArray)
>   #define LEGAL_ANSI_CHARACTER_ARRAY (*FsRtlLegalAnsiCharacterArray)
>   #endif
>   
>
> Modified: trunk/reactos/include/xdk/haltypes.h
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/haltypes.h?rev=64151&r1=64150&r2=64151&view=diff
> ==============================================================================
> --- trunk/reactos/include/xdk/haltypes.h	[iso-8859-1] (original)
> +++ trunk/reactos/include/xdk/haltypes.h	[iso-8859-1] Sun Sep 14 15:49:35 2014
>  <at>  <at>  -273,8 +273,8  <at>  <at> 
>   extern HAL_DISPATCH HalDispatchTable;
>   #define HALDISPATCH (&HalDispatchTable)
>   #else
> +__CREATE_NTOS_DATA_IMPORT_ALIAS(HalDispatchTable)
>   extern PHAL_DISPATCH HalDispatchTable;
> -__CREATE_NTOS_DATA_IMPORT_ALIAS(HalDispatchTable)
>   #define HALDISPATCH HalDispatchTable
>   #endif
>   
>
> Modified: trunk/reactos/include/xdk/kdfuncs.h
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/kdfuncs.h?rev=64151&r1=64150&r2=64151&view=diff
> ==============================================================================
> --- trunk/reactos/include/xdk/kdfuncs.h	[iso-8859-1] (original)
> +++ trunk/reactos/include/xdk/kdfuncs.h	[iso-8859-1] Sun Sep 14 15:49:35 2014
>  <at>  <at>  -125,11 +125,11  <at>  <at> 
>   extern BOOLEAN KdDebuggerNotPresent;
>   #define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
>   #else
> +__CREATE_NTOS_DATA_IMPORT_ALIAS(KdDebuggerEnabled)
>   extern BOOLEAN *KdDebuggerEnabled;
> -__CREATE_NTOS_DATA_IMPORT_ALIAS(KdDebuggerEnabled)
>   #define KD_DEBUGGER_ENABLED (*KdDebuggerEnabled)
> +__CREATE_NTOS_DATA_IMPORT_ALIAS(KdDebuggerNotPresent)
>   extern BOOLEAN *KdDebuggerNotPresent;
> -__CREATE_NTOS_DATA_IMPORT_ALIAS(KdDebuggerNotPresent)
>   #define KD_DEBUGGER_NOT_PRESENT (*KdDebuggerNotPresent)
>   #endif
>   
>
> Modified: trunk/reactos/include/xdk/ketypes.h
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ketypes.h?rev=64151&r1=64150&r2=64151&view=diff
> ==============================================================================
> --- trunk/reactos/include/xdk/ketypes.h	[iso-8859-1] (original)
> +++ trunk/reactos/include/xdk/ketypes.h	[iso-8859-1] Sun Sep 14 15:49:35 2014
>  <at>  <at>  -986,8 +986,8  <at>  <at> 
>   #elif (NTDDI_VERSION >= NTDDI_WINXP)
>   extern NTSYSAPI CCHAR KeNumberProcessors;
>   #else
> +__CREATE_NTOS_DATA_IMPORT_ALIAS(KeNumberProcessors)
>   extern PCCHAR KeNumberProcessors;
> -__CREATE_NTOS_DATA_IMPORT_ALIAS(KeNumberProcessors)
>   #endif
>   
>   $endif (_WDMDDK_)
>
> Modified: trunk/reactos/include/xdk/mmtypes.h
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/mmtypes.h?rev=64151&r1=64150&r2=64151&view=diff
> ==============================================================================
> --- trunk/reactos/include/xdk/mmtypes.h	[iso-8859-1] (original)
> +++ trunk/reactos/include/xdk/mmtypes.h	[iso-8859-1] Sun Sep 14 15:49:35 2014
>  <at>  <at>  -148,8 +148,8  <at>  <at> 
>   } MM_SYSTEMSIZE;
>   
>   #ifndef _NTSYSTEM_
> +__CREATE_NTOS_DATA_IMPORT_ALIAS(Mm64BitPhysicalAddress)
>   extern PBOOLEAN Mm64BitPhysicalAddress;
> -__CREATE_NTOS_DATA_IMPORT_ALIAS(Mm64BitPhysicalAddress)
>   #endif
>   extern NTKERNELAPI PVOID MmBadPointer;
>   
>
> Modified: trunk/reactos/include/xdk/ntifs.template.h
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ntifs.template.h?rev=64151&r1=64150&r2=64151&view=diff
> ==============================================================================
> --- trunk/reactos/include/xdk/ntifs.template.h	[iso-8859-1] (original)
> +++ trunk/reactos/include/xdk/ntifs.template.h	[iso-8859-1] Sun Sep 14 15:49:35 2014
>  <at>  <at>  -1128,8 +1128,8  <at>  <at> 
>   extern PUSHORT NlsOemLeadByteInfo;
>   #define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
>   #else
> +__CREATE_NTOS_DATA_IMPORT_ALIAS(NlsOemLeadByteInfo)
>   extern PUSHORT *NlsOemLeadByteInfo;
> -__CREATE_NTOS_DATA_IMPORT_ALIAS(NlsOemLeadByteInfo)
>   #define NLS_OEM_LEAD_BYTE_INFO (*NlsOemLeadByteInfo)
>   #endif
>   
>
>

_______________________________________________
Ros-dev mailing list
Ros-dev <at> reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev
Timo Kreuzer | 12 Sep 22:53 2014
Picon

Re: [ros-diffs] [jgardou] 64127: [KDGDB] - Add a callback mechanism permitting to "simulate" KD send <-> receive loop without having to actually communicate to GDB - Use that to update the program counter when con...


while(1); is not really a good solution. It should be something that is
visible in GDB.
But I fear that a KeBugCheck() won't work here, since it will rely on a
working KD connection.
Maybe a KD_ASSERT() macro, that calls KdAssert() on failure or
something, resets the GDB connection somehow, issues a debug print and
then halts.

Am 12.09.2014 22:23, schrieb jgardou@...:
> Author: jgardou
> Date: Fri Sep 12 20:23:08 2014
> New Revision: 64127
>
> URL: http://svn.reactos.org/svn/reactos?rev=64127&view=rev
> Log:
> [KDGDB]
>  - Add a callback mechanism permitting to "simulate" KD send <-> receive loop without having to actually
communicate to GDB
>  - Use that to update the program counter when cont'ing a breakpoint
> Now cont'ing an assertion failure is possible, since we actually get beyond the int 3 instruction
>
> Modified:
>     trunk/reactos/drivers/base/kdgdb/gdb_input.c
>     trunk/reactos/drivers/base/kdgdb/kdgdb.h
>     trunk/reactos/drivers/base/kdgdb/kdpacket.c
>
> +)
> +{
> +    DBGKD_MANIPULATE_STATE64* State = (DBGKD_MANIPULATE_STATE64*)MessageHeader->Buffer;
> +
> +    /* We just confirm that all went well */
> +    if ((PacketType != PACKET_TYPE_KD_STATE_MANIPULATE)
> +            || (State->ApiNumber != DbgKdSetContextApi)
> +            || (State->ReturnStatus != STATUS_SUCCESS))
> +    {
> +        /* Should we bugcheck ? */
> +        while (1);
> +    }
> +}
> +
> +static
> +KDSTATUS
> +SetContext(
> +    _Out_ DBGKD_MANIPULATE_STATE64* State,
> +    _Out_ PSTRING MessageData,
> +    _Out_ PULONG MessageLength,
> +    _Inout_ PKD_CONTEXT KdContext,
> +    _In_opt_ KDP_MANIPULATESTATE_HANDLER ManipulateStateHandler
> +)
> +{
> +    State->ApiNumber = DbgKdSetContextApi;
> +    State->Processor = CurrentStateChange.Processor;
> +    State->ReturnStatus = STATUS_SUCCESS;
> +    State->ProcessorLevel = CurrentStateChange.ProcessorLevel;
> +    MessageData->Length = sizeof(CurrentContext);
> +
> +    if (MessageData->MaximumLength < sizeof(CurrentContext))
> +    {
> +        while (1);
> +    }
> +
>

Gmane