beezar / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

Get full process memory and set a HandlerCallback and write dump file failed in Linux (Debian X64) #522

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a instance of ExceptionHandler 

google_breakpad::ExceptionHandler  handler((*(m_pMinidumpDescriptor.get())), 
OnFilterCallback, OnMinidumpCallback, NULL, true, -1);

2.Set a HandlerCallback for writing dump file by user.

handler.set_crash_handler(OnHandlerCallback);

3. make the process crash, but Write dump file failed. User is root, and dump 
path is existing.

What is the expected output? What do you see instead?

expected: dump successfully, write all process mappings into dmp file

instead result: nothing was generated.

Please use labels and text to provide additional information.

I define the MappingList variable and get all mappings from LinuxDumper, 

function: const wasteful_vector<MappingInfo*> &mappings() { return mappings_; 
}, 
and push_back into MappingList one by one, then call WriteMinidump() in 
HandlerCallback
// These overloads also allow passing a list of known mappings and
// a list of additional memory regions to be included in the minidump.
bool WriteMinidump(const char* minidump_path, pid_t crashing_process,
                   const void* blob, size_t blob_size,
                   const MappingList& mappings,
                   const AppMemoryList& appdata);

but WriteMinidump return value is false;

attachment is file about include some code and some comments

Original issue reported on code.google.com by junrenzh...@gmail.com on 13 Mar 2013 at 7:25

Attachments: