[Groonga-commit] groonga/groonga at e6e2aff [master] windows: search *.pdb from GROONGA_DIR\bin

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 19 12:04:32 JST 2017


Kouhei Sutou	2017-10-19 12:04:32 +0900 (Thu, 19 Oct 2017)

  New Revision: e6e2affd859a1dda7f3d46e78ecd3faf12b6bcd0
  https://github.com/groonga/groonga/commit/e6e2affd859a1dda7f3d46e78ecd3faf12b6bcd0

  Message:
    windows: search *.pdb from GROONGA_DIR\bin

  Modified files:
    lib/ctx.c

  Modified: lib/ctx.c (+33 -0)
===================================================================
--- lib/ctx.c    2017-10-18 11:54:40 +0900 (ad1946b7d)
+++ lib/ctx.c    2017-10-19 12:04:32 +0900 (df81843a6)
@@ -1595,6 +1595,39 @@ exception_filter(EXCEPTION_POINTERS *info)
                 SYMOPT_LOAD_LINES |
                 SYMOPT_NO_PROMPTS);
   SymInitialize(process, NULL, TRUE);
+  {
+    char search_path[MAX_PATH * 2];
+    const char *base_dir;
+
+    if (SymGetSearchPath(process, search_path, sizeof(search_path))) {
+      grn_strncat(search_path, sizeof(search_path), ";", 1);
+    } else {
+      search_path[0] = '\0';
+    }
+
+    base_dir = grn_windows_base_dir();
+    {
+      char *current, *end;
+      current = search_path + strlen(search_path);
+      end = current + sizeof(search_path) - 1;
+      for (; *base_dir && current < end; base_dir++, current++) {
+        if (*base_dir == '/') {
+          *current = '\\';
+        } else {
+          *current = *base_dir;
+        }
+      }
+      if ((current + strlen("\\bin") + 1) < end) {
+        (*current++) = '\\';
+        (*current++) = 'b';
+        (*current++) = 'i';
+        (*current++) = 'n';
+      }
+      *current = '\0';
+    }
+
+    SymSetSearchPath(process, search_path);
+  }
 
   memset(&frame, 0, sizeof(STACKFRAME64));
   frame.AddrPC.Mode = AddrModeFlat;
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20171019/c8912408/attachment.htm 



More information about the Groonga-commit mailing list
Back to archive index