+ be_emit_irprintf("\t.stabs\t\"%s:p", name);
+ if (is_Array_type(ptp)) {
+ /* use a local array definition */
+ print_array_type(h, ptp, 1);
+ } else if (is_Pointer_type(ptp)) {
+ /* use local pointer definition */
+ print_pointer_type(h, ptp, 1);
+ } else {
+ type_num = get_type_number(h, ptp);
+
+ /* name:type, bit offset from the start of the struct', number of bits in the element. */
+ be_emit_irprintf("%u", type_num);
+ }
+
+ be_emit_irprintf("\",%d,0,0,%d\n", N_PSYM, ofs);
+ be_emit_write_line();
+ }
+} /* stabs_method_begin */
+
+/**
+ * dump the stabs for a method end
+ */
+static void stabs_method_end(dbg_handle *handle) {
+ stabs_handle *h = (stabs_handle *)handle;
+ ir_entity *ent = h->cur_ent;
+ const be_stack_layout_t *layout = h->layout;
+ const char *ld_name = get_entity_ld_name(ent);
+ int i, n, frame_size;
+ static unsigned scope_nr = 0;
+
+ /* create entries for automatic variables on the stack */
+ frame_size = get_type_size_bytes(layout->frame_type);
+ for (i = 0, n = get_compound_n_members(layout->frame_type); i < n; ++i) {
+ ir_entity *ent = get_compound_member(layout->frame_type, i);
+ ir_type *tp;
+ int ofs;
+ unsigned type_num;
+
+ /* ignore spill slots and other helper objects */
+ if (is_entity_compiler_generated(ent))
+ continue;
+
+ tp = get_entity_type(ent);
+ /* should not happen in backend but ... */
+ if (is_Method_type(tp))
+ continue;
+ type_num = get_type_number(h, tp);
+ ofs = -frame_size + get_entity_offset(ent);
+
+ be_emit_irprintf("\t.stabs\t\"%s:%u\",%d,0,0,%d\n",
+ get_entity_name(ent), type_num, N_LSYM, ofs);
+ be_emit_write_line();