Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(543)

Side by Side Diff: runtime/vm/gdbjit_android.cc

Issue 11231009: Put the GDB symbols stuff under conditional compile. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/gdbjit_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <stdint.h> 5 #include <stdint.h>
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "vm/gdbjit_android.h" 9 #include "vm/gdbjit_android.h"
10 10
(...skipping 13 matching lines...) Expand all
24 24
25 struct jit_descriptor { 25 struct jit_descriptor {
26 uint32_t version; 26 uint32_t version;
27 /* This type should be jit_actions_t, but we use uint32_t 27 /* This type should be jit_actions_t, but we use uint32_t
28 to be explicit about the bitwidth. */ 28 to be explicit about the bitwidth. */
29 uint32_t action_flag; 29 uint32_t action_flag;
30 struct jit_code_entry* relevant_entry; 30 struct jit_code_entry* relevant_entry;
31 struct jit_code_entry* first_entry; 31 struct jit_code_entry* first_entry;
32 }; 32 };
33 33
34 #ifndef GDB_JIT_SYMBOLS
34 /* GDB puts a breakpoint in this function. */ 35 /* GDB puts a breakpoint in this function. */
35 void __attribute__((noinline)) __jit_debug_register_code() { } 36 void __attribute__((noinline)) __jit_debug_register_code() { }
36 37
37 /* Make sure to specify the version statically, because the 38 /* Make sure to specify the version statically, because the
38 debugger may check the version before we can set it. */ 39 debugger may check the version before we can set it. */
39 struct jit_descriptor __jit_debug_descriptor = { 1, 0, 0, 0 }; 40 struct jit_descriptor __jit_debug_descriptor = { 1, 0, 0, 0 };
41 #endif
40 42
41 static struct jit_code_entry* first_dynamic_region = NULL; 43 static struct jit_code_entry* first_dynamic_region = NULL;
42 static struct jit_code_entry* last_dynamic_region = NULL; 44 static struct jit_code_entry* last_dynamic_region = NULL;
43 45
44 void addDynamicSection(const char* symfile_addr, uint64_t symfile_size) { 46 void addDynamicSection(const char* symfile_addr, uint64_t symfile_size) {
45 jit_code_entry* new_entry = reinterpret_cast<jit_code_entry*>( 47 jit_code_entry* new_entry = reinterpret_cast<jit_code_entry*>(
46 malloc(sizeof(jit_code_entry))); 48 malloc(sizeof(jit_code_entry)));
47 if (new_entry != NULL) { 49 if (new_entry != NULL) {
48 new_entry->symfile_addr = symfile_addr; 50 new_entry->symfile_addr = symfile_addr;
49 new_entry->symfile_size = symfile_size; 51 new_entry->symfile_size = symfile_size;
(...skipping 18 matching lines...) Expand all
68 __jit_debug_descriptor.action_flag = JIT_UNREGISTER_FN; 70 __jit_debug_descriptor.action_flag = JIT_UNREGISTER_FN;
69 __jit_debug_descriptor.relevant_entry = iterator; 71 __jit_debug_descriptor.relevant_entry = iterator;
70 __jit_debug_descriptor.first_entry = first_dynamic_region; 72 __jit_debug_descriptor.first_entry = first_dynamic_region;
71 __jit_debug_register_code(); 73 __jit_debug_register_code();
72 iterator = iterator->prev_entry; 74 iterator = iterator->prev_entry;
73 } 75 }
74 first_dynamic_region = NULL; 76 first_dynamic_region = NULL;
75 last_dynamic_region = NULL; 77 last_dynamic_region = NULL;
76 } 78 }
77 }; 79 };
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/gdbjit_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698