Home
last modified time | relevance | path

Searched refs:fde (Results 1 – 19 of 19) sorted by relevance

/system/core/adb/
Dfdevent.cpp62 fdevent* fde; member
65 explicit PollNode(fdevent* fde) : fde(fde) { in PollNode()
67 pollfd.fd = fde->fd.get(); in PollNode()
103 static std::string dump_fde(const fdevent* fde) { in dump_fde() argument
105 if (fde->state & FDE_ACTIVE) { in dump_fde()
108 if (fde->state & FDE_PENDING) { in dump_fde()
111 if (fde->state & FDE_CREATED) { in dump_fde()
114 if (fde->state & FDE_READ) { in dump_fde()
117 if (fde->state & FDE_WRITE) { in dump_fde()
120 if (fde->state & FDE_ERROR) { in dump_fde()
[all …]
Dfdevent.h37 typedef void (*fd_func2)(struct fdevent* fde, unsigned events, void* userdata);
60 void fdevent_destroy(fdevent *fde);
63 unique_fd fdevent_release(fdevent* fde);
66 void fdevent_set(fdevent *fde, unsigned events);
67 void fdevent_add(fdevent *fde, unsigned events);
68 void fdevent_del(fdevent *fde, unsigned events);
74 void fdevent_set_timeout(fdevent* fde, std::optional<std::chrono::milliseconds> timeout);
Dfdevent_test.cpp76 static void FdEventNewCallback(fdevent* fde, unsigned events, void* userdata) { in FdEventNewCallback() argument
77 int fd = fde->fd.get(); in FdEventNewCallback()
176 fdevent* fde; member
184 fdevent_destroy(arg->fde); in InvalidFdEventCallback()
196 read_arg.fde = fdevent_create(INVALID_READ_FD, InvalidFdEventCallback, &read_arg); in InvalidFdThreadFunc()
197 fdevent_add(read_arg.fde, FDE_READ); in InvalidFdThreadFunc()
203 write_arg.fde = fdevent_create(INVALID_WRITE_FD, InvalidFdEventCallback, &write_arg); in InvalidFdThreadFunc()
204 fdevent_add(write_arg.fde, FDE_WRITE); in InvalidFdThreadFunc()
276 fdevent* fde; in TEST_F() member
284 test.fde = fdevent_create(fds[0], [](fdevent* fde, unsigned events, void* arg) { in TEST_F() argument
[all …]
Dsockets.cpp128 fdevent_add(s->fde, FDE_WRITE); in local_socket_flush_incoming()
131 fdevent_add(s->fde, FDE_WRITE); in local_socket_flush_incoming()
146 fdevent_del(s->fde, FDE_WRITE); in local_socket_flush_incoming()
179 s->fde->force_eof); in local_socket_flush_outgoing()
206 fdevent_del(s->fde, FDE_READ); in local_socket_flush_outgoing()
211 if ((s->fde->force_eof && !r) || is_eof) { in local_socket_flush_outgoing()
212 D(" closing because is_eof=%d r=%d s->fde.force_eof=%d", is_eof, r, s->fde->force_eof); in local_socket_flush_outgoing()
241 fdevent_add(s->fde, FDE_READ); in local_socket_ready()
259 auto callback = [](fdevent* fde, unsigned event, void* arg) { in deferred_close() argument
264 while ((rc = adb_read(fde->fd.get(), buf, sizeof(buf))) > 0) { in deferred_close()
[all …]
Dadb_listeners.cpp45 fdevent* fde = nullptr; member in alistener
63 fdevent_destroy(fde); in ~alistener()
221 listener->fde = fdevent_create(listener->fd, ss_listener_event_func, listener.get()); in install_listener()
223 listener->fde = fdevent_create(listener->fd, listener_event_func, listener.get()); in install_listener()
225 fdevent_set(listener->fde, FDE_READ); in install_listener()
Dsocket.h62 fdevent* fde = nullptr; member
/system/core/libunwindstack/tests/
DDwarfDebugFrameTest.cpp168 const DwarfFde* fde = this->debug_frame_->GetFdeFromPc(0x3600); in TYPED_TEST_P() local
169 ASSERT_TRUE(fde != nullptr); in TYPED_TEST_P()
170 EXPECT_EQ(0x3500U, fde->pc_start); in TYPED_TEST_P()
171 EXPECT_EQ(0x3900U, fde->pc_end); in TYPED_TEST_P()
202 const DwarfFde* fde = this->debug_frame_->GetFdeFromPc(0x1600); in TYPED_TEST_P() local
203 ASSERT_TRUE(fde != nullptr); in TYPED_TEST_P()
204 EXPECT_EQ(0x1500U, fde->pc_start); in TYPED_TEST_P()
206 fde = this->debug_frame_->GetFdeFromPc(0x2600); in TYPED_TEST_P()
207 ASSERT_TRUE(fde != nullptr); in TYPED_TEST_P()
208 EXPECT_EQ(0x2500U, fde->pc_start); in TYPED_TEST_P()
[all …]
DDwarfEhFrameTest.cpp65 const DwarfFde* fde = this->eh_frame_->GetFdeFromOffset(0x5100); in TYPED_TEST_P() local
66 ASSERT_TRUE(fde != nullptr); in TYPED_TEST_P()
67 EXPECT_EQ(0x5000U, fde->cie_offset); in TYPED_TEST_P()
68 EXPECT_EQ(0x5110U, fde->cfa_instructions_offset); in TYPED_TEST_P()
69 EXPECT_EQ(0x5200U, fde->cfa_instructions_end); in TYPED_TEST_P()
70 EXPECT_EQ(0x6608U, fde->pc_start); in TYPED_TEST_P()
71 EXPECT_EQ(0x6808U, fde->pc_end); in TYPED_TEST_P()
72 EXPECT_EQ(0U, fde->lsda_address); in TYPED_TEST_P()
74 const DwarfCie* cie = fde->cie; in TYPED_TEST_P()
104 const DwarfFde* fde = this->eh_frame_->GetFdeFromOffset(0x5100); in TYPED_TEST_P() local
[all …]
DDwarfSectionTest.cpp68 DwarfFde fde{}; in TEST_F() local
69 fde.pc_end = 0x2000; in TEST_F()
70 fde.cie = nullptr; in TEST_F()
72 EXPECT_CALL(*section_, GetFdeFromPc(0x1000)).WillOnce(::testing::Return(&fde)); in TEST_F()
80 DwarfFde fde{}; in TEST_F() local
81 fde.pc_end = 0x2000; in TEST_F()
82 fde.cie = &cie; in TEST_F()
84 EXPECT_CALL(*section_, GetFdeFromPc(0x1000)).WillOnce(::testing::Return(&fde)); in TEST_F()
85 EXPECT_CALL(*section_, GetCfaLocationInfo(0x1000, &fde, ::testing::_)) in TEST_F()
94 DwarfFde fde{}; in TEST_F() local
[all …]
DDwarfEhFrameWithHdrTest.cpp152 const DwarfFde* fde = this->eh_frame_->GetFdeFromPc(0x4600); in TYPED_TEST_P() local
153 ASSERT_TRUE(fde != nullptr); in TYPED_TEST_P()
154 EXPECT_EQ(0x4500U, fde->pc_start); in TYPED_TEST_P()
155 EXPECT_EQ(0x4700U, fde->pc_end); in TYPED_TEST_P()
375 const DwarfFde* fde = this->eh_frame_->GetFdeFromOffset(0x14000); in TYPED_TEST_P() local
376 ASSERT_TRUE(fde != nullptr); in TYPED_TEST_P()
377 EXPECT_EQ(0x14010U, fde->cfa_instructions_offset); in TYPED_TEST_P()
378 EXPECT_EQ(0x14024U, fde->cfa_instructions_end); in TYPED_TEST_P()
379 EXPECT_EQ(0x1d008U, fde->pc_start); in TYPED_TEST_P()
380 EXPECT_EQ(0x1d108U, fde->pc_end); in TYPED_TEST_P()
[all …]
DDwarfSectionImplTest.cpp498 DwarfFde fde{}; in TYPED_TEST_P() local
499 fde.cie = &cie; in TYPED_TEST_P()
500 fde.cie_offset = 0x8000; in TYPED_TEST_P()
501 fde.cfa_instructions_offset = 0x6000; in TYPED_TEST_P()
502 fde.cfa_instructions_end = 0x6002; in TYPED_TEST_P()
508 ASSERT_TRUE(this->section_->GetCfaLocationInfo(0x100, &fde, &loc_regs)); in TYPED_TEST_P()
526 DwarfFde fde{}; in TYPED_TEST_P() local
527 fde.cie = &cie; in TYPED_TEST_P()
528 fde.cie_offset = 0x8000; in TYPED_TEST_P()
529 fde.cfa_instructions_offset = 0x6000; in TYPED_TEST_P()
[all …]
/system/core/libunwindstack/
DDwarfSection.cpp44 const DwarfFde* fde = GetFdeFromPc(pc); in Step() local
45 if (fde == nullptr || fde->cie == nullptr) { in Step()
52 if (!GetCfaLocationInfo(pc, fde, &loc_regs)) { in Step()
55 loc_regs.cie = fde->cie; in Step()
253 DwarfFde* fde = &fde_entries_[offset]; in GetFdeFromOffset() local
255 if (!FillInFdeHeader(fde) || !FillInFde(fde)) { in GetFdeFromOffset()
259 return fde; in GetFdeFromOffset()
263 bool DwarfSectionImpl<AddressType>::FillInFdeHeader(DwarfFde* fde) { in FillInFdeHeader() argument
279 fde->cfa_instructions_end = memory_.cur_offset() + length64; in FillInFdeHeader()
295 fde->cie_offset = GetCieOffsetFromFde64(value64); in FillInFdeHeader()
[all …]
DDwarfEhFrameWithHdr.cpp105 const DwarfFde* fde = this->GetFdeFromOffset(fde_offset); in GetFdeFromPc() local
106 if (fde == nullptr) { in GetFdeFromPc()
111 if (pc < fde->pc_end) { in GetFdeFromPc()
112 return fde; in GetFdeFromPc()
189 const DwarfFde* fde = this->GetFdeFromOffset(info->offset); in GetFdes() local
190 if (fde == nullptr) { in GetFdes()
193 fdes->push_back(fde); in GetFdes()
DDwarfCfa.h75 DwarfCfa(DwarfMemory* memory, const DwarfFde* fde) : memory_(memory), fde_(fde) {} in DwarfCfa() argument
/system/core/libunwindstack/tools/
Dunwind_info.cpp85 for (const DwarfFde* fde : *section) { in DumpDwarfSection()
88 if (fde == nullptr || fde->pc_start == fde->pc_end) { in DumpDwarfSection()
91 printf("\n PC 0x%" PRIx64 "-0x%" PRIx64, fde->pc_start, fde->pc_end); in DumpDwarfSection()
94 if (elf->GetFunctionName(fde->pc_start, &name, &func_offset) && !name.empty()) { in DumpDwarfSection()
98 if (!section->Log(2, UINT64_MAX, fde)) { in DumpDwarfSection()
99 printf("Failed to process cfa information for entry at 0x%" PRIx64 "\n", fde->pc_start); in DumpDwarfSection()
Dunwind_reg_info.cpp67 const DwarfFde* fde = section->GetFdeFromPc(pc); in PrintRegInformation() local
68 if (fde == nullptr) { in PrintRegInformation()
74 if (!section->GetCfaLocationInfo(pc, fde, &regs)) { in PrintRegInformation()
/system/core/adb/daemon/
Djdwp_service.cpp138 this->fde = fdevent_create(socket, jdwp_process_event, this); in JdwpProcess()
140 if (!this->fde) { in JdwpProcess()
145 fdevent_add(this->fde, FDE_READ); in JdwpProcess()
154 if (this->fde) { in ~JdwpProcess()
155 fdevent_destroy(this->fde); in ~JdwpProcess()
156 this->fde = nullptr; in ~JdwpProcess()
175 fdevent* fde = nullptr; member
251 fdevent_del(proc->fde, FDE_WRITE); in jdwp_process_event()
277 fdevent_add(proc->fde, FDE_WRITE); in create_jdwp_connection_fd()
298 fdevent* fde; member
[all …]
Dservices.cpp138 fdevent* fde = fdevent_create( in spin_service() local
140 fdevent_add(fde, FDE_READ); in spin_service()
/system/core/libunwindstack/include/unwindstack/
DDwarfSection.h93 virtual bool Log(uint8_t indent, uint64_t pc, const DwarfFde* fde) = 0;
99 virtual bool GetCfaLocationInfo(uint64_t pc, const DwarfFde* fde, dwarf_loc_regs_t* loc_regs) = 0;
137 bool GetCfaLocationInfo(uint64_t pc, const DwarfFde* fde, dwarf_loc_regs_t* loc_regs) override;
139 bool Log(uint8_t indent, uint64_t pc, const DwarfFde* fde) override;
146 bool FillInFdeHeader(DwarfFde* fde);
148 bool FillInFde(DwarfFde* fde);
187 void InsertFde(const DwarfFde* fde);