1 /* Copyright (c) 2014-2015. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
11 #include "mc_object_info.h"
12 #include "mc_private.h"
24 this->element_count = 0;
25 this->members = nullptr;
26 this->is_pointer_type = 0;
27 this->subtype = nullptr;
28 this->full_type = nullptr;
33 xbt_dynar_free(&this->members);
38 dw_frame_t ObjectInformation::find_function(const void *ip) const
40 xbt_dynar_t dynar = this->functions_index;
41 mc_function_index_item_t base =
42 (mc_function_index_item_t) xbt_dynar_get_ptr(dynar, 0);
44 int j = xbt_dynar_length(dynar) - 1;
46 int k = i + ((j - i) / 2);
47 if (ip < base[k].low_pc) {
49 } else if (ip >= base[k].high_pc) {
52 return base[k].function;
58 dw_variable_t ObjectInformation::find_variable(const char* name) const
60 unsigned int cursor = 0;
61 dw_variable_t variable;
62 xbt_dynar_foreach(this->global_variables, cursor, variable){
63 if(!strcmp(name, variable->name))