Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

jdb_lines.h

Go to the documentation of this file.
00001 // AUTOMATICALLY GENERATED -- DO NOT EDIT!         -*- c++ -*-
00002 
00003 #ifndef jdb_lines_h
00004 #define jdb_lines_h
00005 
00006 #include "l4_types.h"
00007 
00008 //
00009 // INTERFACE definition follows 
00010 //
00011 
00012 
00013 class Jdb_lines_line
00014 {
00015 public:
00016   unsigned int   addr __attribute__ ((packed));
00017   unsigned short line __attribute__ ((packed));
00018 };
00019 
00020 class Jdb_lines_info
00021 {
00022 private:
00023   Address  _virt;
00024   size_t   _size;
00025   Address  _beg_line;
00026   Address  _end_line;
00027 
00028 public:  
00029   inline Jdb_lines_line* lin();
00030   
00031   inline const char* str();
00032   
00033   inline void get(Address &virt, size_t &size);
00034   
00035   inline void reset();
00036   
00037   inline bool in_range(Address addr);
00038   
00039   // register lines for a specific task (called by user mode application)
00040   bool set(Address virt, size_t size);
00041 };
00042 
00043 class Jdb_lines
00044 {
00045 public:
00046   enum
00047   {
00048     // don't allow more than 2048 tasks to register their lines to save space
00049     Max_tasks = L4_uid::Max_tasks < 2048 ? L4_uid::Max_tasks : 2048,
00050   };
00051 
00052 private:
00053   static Jdb_lines_info *_task_lines;
00054 
00055 public:  
00056   static void init(void *mem, Mword pages);
00057   
00058   static Jdb_lines_info* lookup(Task_num task);
00059   
00060   // search line name that matches for a specific address
00061   static bool match_addr_to_line(Address addr, Task_num task, char *line, unsigned line_size, int show_header_files);
00062   
00063   // search line name that matches for a specific address
00064   static bool match_addr_to_line_fuzzy(Address *addr_ptr, Task_num task, char *line, unsigned line_size, int show_header_files);
00065 
00066 private:  
00067   // truncate string if its length exceeds strsize and create line
00068   static void sprint_line(const char *dir, const char *fname, unsigned line, char *str, size_t strsize);
00069 };
00070 
00071 //
00072 // IMPLEMENTATION of inline functions (and needed classes)
00073 //
00074 
00075 
00076 
00077 
00078 inline void
00079 Jdb_lines_info::get(Address &virt, size_t &size)
00080 {
00081   virt = _virt;
00082   size = _size;
00083 }
00084 
00085 
00086 
00087 inline void
00088 Jdb_lines_info::reset()
00089 {
00090   _virt = 0;
00091 }
00092 
00093 #endif // jdb_lines_h

Generated on Mon Sep 26 14:20:11 2005 for Fiasco by  doxygen 1.4.2