~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/stacktrace.cc

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
using namespace std;
42
42
 
 
43
namespace drizzled
 
44
{
 
45
 
43
46
#define PTR_SANE(p) ((p) && (char*)(p) >= heap_start && (char*)(p) <= heap_end)
44
47
 
45
48
char *heap_start;
174
177
  fprintf(stderr, "Stack range sanity check OK, backtrace follows:\n");
175
178
 
176
179
  /* We are 1 frame above signal frame with NPTL and 2 frames above with LT */
177
 
  sigreturn_frame_count = thd_lib_detected == THD_LIB_LT ? 2 : 1;
 
180
  sigreturn_frame_count = internal::thd_lib_detected == THD_LIB_LT ? 2 : 1;
178
181
 
179
182
  while (fp < (unsigned char**) stack_bottom)
180
183
  {
204
207
          "problem, so please do resolve it\n");
205
208
}
206
209
#endif /* TARGET_OS_LINUX */
 
210
 
 
211
} /* namespace drizzled */
 
212
 
207
213
#endif /* HAVE_STACKTRACE */
208
214
 
209
215
/* Produce a core for the thread */
210
216
 
 
217
namespace drizzled
 
218
{
 
219
 
211
220
void write_core(int sig)
212
221
{
213
222
  signal(sig, SIG_DFL);
226
235
  sigsend(P_PID,P_MYID,sig);
227
236
#endif
228
237
}
 
238
 
 
239
} /* namespace drizzled */